Skip to main content

Module migration_support

Module migration_support 

Source
Expand description

Migration file rendering and registration — mirrors doido-generators helpers without depending on that crate.

Constants§

MIGRATION_LIB_BASE
Fallback migration lib.rs used 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::migration import line for a create_table migration.
create_table_up
Builds the up() body for a create_table migration.
drop_table_down
The down() body that drops a table.
register_migration
Inserts a mod <module>; declaration and a Box::new(<module>::Migration) registration into the migration crate’s lib.rs, just above the generator markers.
render_migration_file
Renders a full migration file from the imports line and the up/down bodies.