Skip to content

Commit

Permalink
Merge pull request #18 from psarando/CORE-1892
Browse files Browse the repository at this point in the history
CORE-1892 Add migration for app_versions Foreign Key for integration_data_id
  • Loading branch information
psarando authored May 1, 2023
2 parents e89e330 + 9a4a15d commit 9e999dc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions migrations/000035_app_integration_data_id_fk.down.sql
Original file line number Diff line number Diff line change
@@ -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;
15 changes: 15 additions & 0 deletions migrations/000035_app_integration_data_id_fk.up.sql
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 9e999dc

Please sign in to comment.