diff --git a/migrations/000035_app_integration_data_id_fk.down.sql b/migrations/000035_app_integration_data_id_fk.down.sql new file mode 100644 index 0000000..aeedc1e --- /dev/null +++ b/migrations/000035_app_integration_data_id_fk.down.sql @@ -0,0 +1,13 @@ +BEGIN; + +SET search_path = public, pg_catalog; + +-- +-- Foreign Key for `integration_data_id` column in `app_versions` table. +-- +ALTER TABLE IF EXISTS app_versions + DROP CONSTRAINT IF EXISTS app_integration_data_id_fk; + +DROP INDEX IF EXISTS app_versions_integration_data_id; + +COMMIT; diff --git a/migrations/000035_app_integration_data_id_fk.up.sql b/migrations/000035_app_integration_data_id_fk.up.sql new file mode 100644 index 0000000..24bf7bb --- /dev/null +++ b/migrations/000035_app_integration_data_id_fk.up.sql @@ -0,0 +1,15 @@ +BEGIN; + +SET search_path = public, pg_catalog; + +-- +-- Foreign Key for `integration_data_id` column in `app_versions` table. +-- +ALTER TABLE ONLY app_versions + ADD CONSTRAINT app_integration_data_id_fk + FOREIGN KEY (integration_data_id) + REFERENCES integration_data(id); + +CREATE INDEX IF NOT EXISTS app_versions_integration_data_id ON app_versions(integration_data_id); + +COMMIT;