migrant_lib
Embeddable migration management
migrant_lib
allows defining and embedding management of migration in your shipped app.
config.use_migrations?;
Migrations can be defined as files or functions. Migration files must exist at runtime.
Migration tags must all be unique. Function migrations must have the signature
fn(DbConn) -> Result<(), Box<std::error::Error>>
. See the
programmable example
for a working sample.
Migrations management identical to migrant
cli tool can also be embedded.
This method only supports file-base migrations generated by migrant_lib
(or migrant
cli). See the
embedded example
for a working sample.