feat: add billing_interval to products supporting one-time, monthly and yearly subscription pricing

This commit is contained in:
DanielS
2026-05-01 02:33:51 +02:00
parent 1ec164cd7b
commit cc10352d72
5 changed files with 103 additions and 34 deletions

View File

@@ -0,0 +1,4 @@
-- Add billing_interval to products to support subscription and one-time products
-- Values: 'one_time', 'monthly', 'yearly'
ALTER TABLE public.products ADD COLUMN IF NOT EXISTS billing_interval TEXT DEFAULT 'monthly' NOT NULL
CHECK (billing_interval IN ('one_time', 'monthly', 'yearly'));