Manual2. Migrations

2. Migrations

A migration is a SQL file that changes the schema. Migrations are applied in order, and the database records which ones it has applied.

StepPractice
WriteOne file per change, in supabase/migrations/, named by timestamp.
TestThe migration runs against a local or branch database before it goes near production.
Previewsupabase db push --linked --dry-run from a linked checkout.
Releasesupabase db push --linked, then merge the code that depends on the change.
ConfirmThe application reports which migration it expects and which the database has. The GitHub manual covers the merge that follows.

The database moves before the code. Code that expects a column the database does not have yet fails on its first request; a new column the old code does not use costs nothing.

The application compares the newest migration its code expects with the newest one the database has applied, and reports itself unhealthy on a mismatch in either direction, so the merge follows its migration immediately.

A second checkout made for parallel work is not linked to the project even when the first one is, because the link lives in supabase/.temp/, which is not committed. Releases are made from a checkout whose link has been checked.

Verified November 27, 2026 against Supabase's documentation and the firm's records. References

Wetware Labs is a Kansas City software and search marketing firm. We run search programs for service businesses: technical health, local search, content and AI search.

Start with an audit