fix subscription page
Build & Deploy / Build & Push Docker Image (push) Successful in 7m57s
Test / Type Check (all packages) (push) Successful in 4m27s
Build & Deploy / Deploy to VPS (push) Successful in 7s
Test / API Unit Tests (push) Failing after 3m2s
Test / Homepage Unit Tests (push) Successful in 4m3s
Test / Storefront Unit Tests (push) Successful in 3m32s
Test / Admin Unit Tests (push) Successful in 3m27s
Test / Dashboard Unit Tests (push) Successful in 3m3s
Test / API Integration Tests (push) Failing after 3m53s

This commit is contained in:
root
2026-06-29 23:15:55 -04:00
parent a752a399c2
commit f22e0d45e1
22 changed files with 842 additions and 72 deletions
@@ -0,0 +1,15 @@
-- Update subscription plan defaults.
-- Amounts are stored in MAD centimes.
-- Annual prices are calculated as monthly * 12 with a 20% discount.
INSERT INTO "pricing_configs" ("id", "plan", "billingPeriod", "amount", "updatedAt")
VALUES
('prc_starter_monthly', 'STARTER', 'MONTHLY', 14900, NOW()),
('prc_starter_annual', 'STARTER', 'ANNUAL', 143040, NOW()),
('prc_growth_monthly', 'GROWTH', 'MONTHLY', 29900, NOW()),
('prc_growth_annual', 'GROWTH', 'ANNUAL', 287040, NOW()),
('prc_pro_monthly', 'PRO', 'MONTHLY', 39900, NOW()),
('prc_pro_annual', 'PRO', 'ANNUAL', 383040, NOW())
ON CONFLICT ("plan", "billingPeriod") DO UPDATE
SET
"amount" = EXCLUDED."amount",
"updatedAt" = EXCLUDED."updatedAt";