-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from psarando/CORE-1892
CORE-1892 Add migration for app_versions Foreign Key for integration_data_id
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |