LEARN_ENGLISH plans unlock LMS only; IELTS and DUOLINGO unlock matching exam-prep catalog courses. Enable category subscription gating, restrict programs to Learn English, and treat Duolingo subscriptions as non-expiring one-time purchases. Co-authored-by: Cursor <cursoragent@cursor.com>
10 lines
336 B
SQL
10 lines
336 B
SQL
-- DUOLINGO subscriptions are one-time purchases with no real expiry.
|
|
UPDATE user_subscriptions us
|
|
SET
|
|
expires_at = TIMESTAMPTZ '9999-12-31 23:59:59+00',
|
|
updated_at = CURRENT_TIMESTAMP
|
|
FROM subscription_plans sp
|
|
WHERE us.plan_id = sp.id
|
|
AND sp.category = 'DUOLINGO'
|
|
AND us.expires_at < TIMESTAMPTZ '9999-01-01 00:00:00+00';
|