Expand description
Migration file rendering and registration — mirrors doido-generators helpers
without depending on that crate.
Constants§
- MIGRATION_
LIB_ BASE - Fallback migration
lib.rsused when the app doesn’t have one on disk yet. - MIGRATION_
SRC_ DIR - Directory holding the SeaORM migration crate’s sources.
Functions§
- create_
table_ imports - The
doido_model::migrationimport line for acreate_tablemigration. - create_
table_ up - Builds the
up()body for acreate_tablemigration. - drop_
table_ down - The
down()body that drops a table. - register_
migration - Inserts a
mod <module>;declaration and aBox::new(<module>::Migration)registration into the migration crate’slib.rs, just above the generator markers. - render_
migration_ file - Renders a full migration file from the imports line and the
up/downbodies.