Skip to content

Commit

Permalink
Fix regression that prevented pipeline deletes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Jul 14, 2023
1 parent dafff5b commit 01f9c15
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arroyo-api/migrations/V11__delete_cascade.sql
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;

0 comments on commit 01f9c15

Please sign in to comment.