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