Migrations
Migrations
Reviewed SQL files from one schema catalog to the next, then plan, lint, and apply per target.
A migration is reviewed SQL from one catalog snapshot to the next. Generate writes the file; plan prints the steps; apply runs them on a target; check reports live drift.
Start with First migration when the database is empty. An existing database starts at Existing database. A Drizzle schema starts at From Drizzle.
| Page | You use it for |
|---|---|
| Existing database | Pull, generate, then baseline without replaying DDL. |
| From Drizzle | Import a Drizzle schema into okmodel tables. |
| Lint | Replay history in a scratch schema and read the lint codes. |
| Backfill | A data step that resumes by primary key. |
| Failures | What a failed step leaves behind, and how to resolve it. |
| Environments | Preview and rehearsal targets. |