Devin
04/24/2023, 7:32 PMWITH deleted_artifacts AS (
DELETE FROM artifact
WHERE flow_run_id = $1
RETURNING flow_run_id
)
DELETE FROM flow_run
WHERE id IN (SELECT DISTINCT flow_run_id FROM deleted_artifacts);
Serina
04/24/2023, 7:38 PMDevin
04/24/2023, 7:58 PMSerina
04/24/2023, 8:08 PMDevin
04/24/2023, 8:11 PMSerina
04/24/2023, 8:33 PMartifact
table and I don’t think that should cause issues. However, I can’t say with certainty. If you truly can’t upgrade, I’d remove the constraint and you can add it back if you need to: https://github.com/PrefectHQ/prefect/pull/8457/filesDevin
04/24/2023, 8:34 PM