Function sqlx_migrate::cli::run
source · pub fn run<Db>(
migrations_path: impl AsRef<Path>,
migrations: impl IntoIterator<Item = Migration<Db>>
)where
Db: Database,
Db::Connection: Migrations,
for<'a> &'a mut Db::Connection: Executor<'a>,
Available on crate feature
cli
only.Expand description
Run a CLI application that provides operations with the given migrations.
When compiled with debug_assertions
, it additionally allows modifying migrations
at the given migrations_path
.
Although not required, migrations
are expected to be originated from migrations_path
.
Panics
This functon assumes that it has control over the entire application.
It will happily alter global state (tracing), panic, or terminate the process.