refactor: remove yearly billing interval, keep only one_time and monthly
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- Remove yearly from the billing_interval constraint, leaving only one_time and monthly
|
||||
ALTER TABLE public.products DROP CONSTRAINT IF EXISTS products_billing_interval_check;
|
||||
ALTER TABLE public.products ADD CONSTRAINT products_billing_interval_check
|
||||
CHECK (billing_interval IN ('one_time', 'monthly'));
|
||||
|
||||
-- Update any existing yearly products to monthly
|
||||
UPDATE public.products SET billing_interval = 'monthly' WHERE billing_interval = 'yearly';
|
||||
Reference in New Issue
Block a user