Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: delete task and stage in pipelines (#7474)
p0nyff7a23e7dc3f
diff --git a/backend/migrator/migration/prod/2.5/0000##add_pipeline_project_id.sql b/backend/migrator/migration/prod/2.5/0000##add_pipeline_project_id.sqlindex ce4588c7b0..c99a5c6710 100644--- a/backend/migrator/migration/prod/2.5/0000##add_pipeline_project_id.sql+++ b/backend/migrator/migration/prod/2.5/0000##add_pipeline_project_id.sql@@ -10,6 +10,10 @@ SET project_id = issue.project_idFROM issueWHERE issue.pipeline_id = pipeline.id;+DELETE FROM task WHERE task.pipeline_id IN (SELECT pipeline.id FROM pipeline WHERE pipeline.project_id IS NULL);++DELETE FROM stage WHERE stage.pipeline_id IN (SELECT pipeline.id FROM pipeline WHERE pipeline.project_id IS NULL);+DELETE FROM pipeline WHERE project_id IS NULL;ALTER TABLE pipeline ALTER COLUMN project_id SET NOT NULL;