First Migration Cycle¶
Once your first model works, the next milestone is a repeatable migration workflow.
This page shows the default path used in most Edgy projects.
Prerequisite¶
Make sure Edgy can resolve your app instance.
Use one of:
--app path.to.moduleEDGY_DEFAULT_APP=path.to.modulepreloadsin custom settings
See Application Discovery for details.
Standard Cycle¶
graph LR
A["edgy init"] --> B["edgy makemigrations -m '<message>'"]
B --> C["Review generated revision"]
C --> D["edgy migrate"]
D --> E["edgy current / edgy check"]
Step-by-Step¶
1. Initialize migration repository¶
2. Generate migrations from model changes¶
3. Apply migrations¶
4. Validate migration state¶
Why This Order Matters¶
initcreates the migration environment once.makemigrationscaptures model deltas explicitly.migrateapplies those deltas to the target database.currentandcheckprevent drift between code and schema.
Troubleshooting¶
If auto-discovery fails, start commands with:
If multiple heads appear: