mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-22 15:01:39 +03:00
a66fb42ce2
* 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
16 lines
633 B
SQL
16 lines
633 B
SQL
-- Make hdb_catalog.hdb_schema_update_event as single row table
|
|
-- Delete insert trigger and setup update trigger
|
|
|
|
DELETE FROM hdb_catalog.hdb_schema_update_event;
|
|
|
|
CREATE UNIQUE INDEX hdb_schema_update_event_one_row
|
|
ON hdb_catalog.hdb_schema_update_event ((occurred_at IS NOT NULL));
|
|
|
|
ALTER TABLE hdb_catalog.hdb_schema_update_event DROP COLUMN id;
|
|
|
|
DROP TRIGGER hdb_schema_update_event_notifier ON hdb_catalog.hdb_schema_update_event;
|
|
|
|
CREATE TRIGGER hdb_schema_update_event_notifier AFTER INSERT OR UPDATE ON
|
|
hdb_catalog.hdb_schema_update_event FOR EACH ROW EXECUTE PROCEDURE
|
|
hdb_catalog.hdb_schema_update_event_notifier();
|