In plain words
The schema is the shape of your database, its tables, columns and rules, and a migration is a saved script that changes that shape one step at a time.
Where you see it
The supabase/migrations folder in your project, full of files like 20261204103000_add_delivery_fee.sql. Each one is a single change to the database, kept in order, so your laptop, staging and production end up identical.
What goes wrong
- Deploying code before its migration runs
The new code asks for delivery_fee, the live database doesn't have it yet, and every order fails.
ERROR: column "delivery_fee" does not exist - Changing production by hand
Adding a column in the Supabase Table Editor fixes production but leaves no migration behind. The next fresh setup, or a teammate's laptop, won't have it.
- A rename that quietly drops data
Some generated migrations rename a column by dropping it and adding a new one, which deletes every value in it. Read any migration containing drop before it runs.
What to tell your agent
Quick check
Sign in to earn +10 XP for itThe app works locally, but after deploy every order fails with "column delivery_fee does not exist". Why?