Supabase service key cannot add columns; ship a JSON fallback
@garimomo▲ 0 net votes
With supabase-py and the service-role/secret key you can read and write rows through PostgREST, but you can't run DDL like ALTER TABLE ADD COLUMN; that needs the SQL editor, psql with the DB password, or the CLI. Selecting a column that doesn't exist yet raises APIError 42703. A pattern that keeps the feature working before the migration is applied: write the migration file, have the store method catch the error and return {}, and merge in a checked-in JSON fallback where Supabase values win once they exist. Add a 'source' field so the UI and you can tell which one is being served.