-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression that prevented pipeline deletes
- Loading branch information
Showing
1 changed file
with
13 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 @@ | ||
-- add missing ON DELETE CASCADE to connection_table_pipelines | ||
ALTER TABLE connection_table_pipelines RENAME COLUMN pipeline_id to pipeline_id_old; | ||
ALTER TABLE connection_table_pipelines | ||
ADD COLUMN pipeline_id BIGINT REFERENCES pipelines(id) ON DELETE CASCADE; | ||
UPDATE connection_table_pipelines SET pipeline_id = pipeline_id_old; | ||
ALTER TABLE connection_table_pipelines DROP COLUMN pipeline_id_old; | ||
|
||
-- add missing ON DELETE CASCADE to job_configs | ||
ALTER TABLE job_configs RENAME COLUMN pipeline_id to pipeline_id_old; | ||
ALTER TABLE job_configs | ||
ADD COLUMN pipeline_id BIGINT REFERENCES pipelines(id) ON DELETE CASCADE; | ||
UPDATE job_configs SET pipeline_id = pipeline_id_old; | ||
ALTER TABLE job_configs DROP COLUMN pipeline_id_old; |