xtablo-source/supabase
Arthur Belleville 0012bc87b3
db: enforce is_temporary = false on paid plans at the schema level
Adds a BEFORE trigger and CHECK constraint on profiles to guarantee that
is_temporary cannot coexist with a paid plan (solo, team, or annual),
regardless of which code path performs the update.

Also back-fills any existing inconsistent rows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 22:18:40 +02:00
..
migrations db: enforce is_temporary = false on paid plans at the schema level 2026-03-30 22:18:40 +02:00
migrations_backup Remove debug trigger migration 2025-11-06 08:39:20 +01:00
tests allow invited to upgrade plan 2026-03-24 19:10:15 +01:00