Files
warmbly/internal/infrastructure/db/migrations/000080_default_free_trial_plan.down.sql
T

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'
);