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