refactor: remove yearly billing interval, keep only one_time and monthly
This commit is contained in:
1
shop/supabase/.branches/_current_branch
Normal file
1
shop/supabase/.branches/_current_branch
Normal file
@@ -0,0 +1 @@
|
||||
main
|
||||
1
shop/supabase/.temp/cli-latest
Normal file
1
shop/supabase/.temp/cli-latest
Normal file
@@ -0,0 +1 @@
|
||||
v2.95.4
|
||||
@@ -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';
|
||||
1
shop/supabase/snippets/Untitled query 657.sql
Normal file
1
shop/supabase/snippets/Untitled query 657.sql
Normal file
@@ -0,0 +1 @@
|
||||
update auth.users set email_confirmed_at = now() where email = 'test@test.com';
|
||||
Reference in New Issue
Block a user