Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: fix task data (#11232)

Danny Xu1a40b2f3739a
diff --git a/backend/migrator/migration/prod/2.15/0002##pitr.sql b/backend/migrator/migration/prod/2.15/0002##pitr.sql
index f594544383..36306457f9 100644
--- a/backend/migrator/migration/prod/2.15/0002##pitr.sql
+++ b/backend/migrator/migration/prod/2.15/0002##pitr.sql
@@ -6,6 +6,7 @@ DELETE FROM anomaly WHERE type = 'bb.anomaly.database.backup.policy-violation';
DELETE FROM policy WHERE type = 'bb.policy.backup-plan';
DELETE FROM policy WHERE type = 'bb.policy.workspace-iam';
DELETE FROM plan_check_run WHERE type = 'bb.plan-check.database.pitr.mysql';
+DELETE FROM task_dag;
DELETE FROM task_run WHERE task_id IN (SELECT id FROM task WHERE type = 'bb.task.database.backup' OR type = 'bb.task.database.restore.pitr.restore' OR type = 'bb.task.database.restore.pitr.cutover');
DELETE FROM task WHERE type = 'bb.task.database.backup' OR type = 'bb.task.database.restore.pitr.restore' OR type = 'bb.task.database.restore.pitr.cutover';
DELETE FROM stage WHERE NOT EXISTS (SELECT task.id FROM task WHERE task.stage_id = stage.id);