mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-29 00:06:05 +00:00
8 lines
312 B
SQL
8 lines
312 B
SQL
-- Only removes the plan when nothing references it; a deployment that has been
|
|
-- running has subscriptions pointing at this row.
|
|
DELETE FROM plans
|
|
WHERE id = '00000000-0000-0000-0000-000000000001'
|
|
AND NOT EXISTS (
|
|
SELECT 1 FROM subscriptions WHERE plan_id = '00000000-0000-0000-0000-000000000001'
|
|
);
|