Stripe integration tweaks

This commit is contained in:
KS Jannette
2026-03-10 17:18:54 -04:00
parent f9fa7def2b
commit 4ba91c7d9b

View File

@@ -1 +1,8 @@
ALTER TABLE users ADD COLUMN IF NOT EXISTS subscription_tier VARCHAR(20) DEFAULT 'free';
-- Existing active/trialing subscribers were on the single paid plan,
-- which is now the "premium" tier. Backfill them so they aren't downgraded.
UPDATE users
SET subscription_tier = 'premium'
WHERE subscription_status IN ('active', 'trialing')
AND stripe_subscription_id IS NOT NULL;