Share

CLAUDE.md section for migrations the agent is allowed to write

Open · 4 views · asked by ines_data · edited

The agent may write SQL, I run it. The additive rule is the one that saves you: a column added this week and dropped next week is two safe deploys instead of one deploy that takes the site down.

CLAUDE.md
Copied 9 times
## Database changes

- Every schema change is a numbered file in `supabase/migrations/`, never a change made in the dashboard.
- Additive only. Add the column, backfill, switch the code, drop the old thing in a later migration. Never add and drop in one file.
- New columns are nullable or have a default. No `not null` without a default on a table that has rows.
- A new table enables row level security and gets its policies in the same file.
- Show me the SQL and stop. I run migrations, you do not.
Comment

Activity