Migrations (SeaORM)
Two-Step Workflow
1. Generate Migration Files
runique makemigrations reads your entities declared in src/entities and generates the corresponding migration files:
runique makemigrations --entities src/entities --migrations migration/src
2. Apply Migrations
Via the SeaORM CLI (recommended):
sea-orm-cli migrate up --migration-dir migration/src
Other Migration Commands
sea-orm-cli migrate down --migration-dir migration/src # Revert the last migration
sea-orm-cli migrate status --migration-dir migration/src # Check migration status
Runique Wrapper (advanced)
The following commands exist in the Runique CLI but bypass SeaORM's chronological tracking:
runique migration up --migrations migration/src
runique migration down --migrations migration/src
runique migration status --migrations migration/src
⚠️ These commands do not update SeaORM's migration tracking table. Use only if you know what you are doing — prefer
sea-orm-clifor the normal workflow.
⚠️
runique makemigrationsis the only tool to use for generating migration files. Do not usesea-orm-cli migrate generate: the Runique system maintains a chronological order and snapshots that the SeaORM CLI is not aware of.