1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-15 01:12:56 +03:00
graphql-engine/server/src-rsr/migrations/9_to_10.sql
Ajeet D'Souza a66fb42ce2 Make catalog metadata migrations work on all schema versions (fix ) ()
* Separate DB and metadata migrations
* Refactor Migrate.hs to generate list of migrations at compile-time
* Replace ginger with shakespeare to improve performance
* Improve migration log messages
2019-10-11 00:13:57 -05:00

11 lines
727 B
SQL

ALTER TABLE hdb_catalog.hdb_relationship
DROP CONSTRAINT hdb_relationship_table_schema_fkey,
ADD CONSTRAINT hdb_relationship_table_schema_fkey FOREIGN KEY (table_schema, table_name) REFERENCES hdb_catalog.hdb_table(table_schema, table_name) ON UPDATE CASCADE;
ALTER TABLE hdb_catalog.hdb_permission
DROP CONSTRAINT hdb_permission_table_schema_fkey,
ADD CONSTRAINT hdb_permission_table_schema_fkey FOREIGN KEY (table_schema, table_name) REFERENCES hdb_catalog.hdb_table(table_schema, table_name) ON UPDATE CASCADE;
ALTER TABLE hdb_catalog.event_triggers
ADD CONSTRAINT event_triggers_table_schema_fkey FOREIGN KEY (schema_name, table_name) REFERENCES hdb_catalog.hdb_table(table_schema, table_name) ON UPDATE CASCADE;