Struct refinery::Runner[][src]

pub struct Runner { /* fields omitted */ }
Expand description

Struct that represents the entrypoint to run the migrations, an instance of this struct is returned by the embed_migrations! and include_migration_mods! macros. Runner should not need to be instantiated manually

Implementations

instantiate a new Runner

Get the gathered migrations.

Set the target version up to which refinery should migrate, Latest migrates to the latest version available Version migrates to a user provided version, a Version with a higher version than the latest will be ignored. by default this is set to Latest

Set true if all migrations should be grouped and run in a single transaction. by default this is set to false, each migration runs on their own transaction

Note

set_grouped won’t probably work on MySQL Databases as MySQL lacks support for transactions around schema alteration operations, meaning that if a migration fails to apply you will have to manually unpick the changes in order to try again (it’s impossible to roll back to an earlier point).

Set true if migration process should abort if divergent migrations are found i.e. applied migrations with the same version but different name or checksum from the ones on the filesystem. by default this is set to true

Set true if migration process should abort if missing migrations are found i.e. applied migrations that are not found on the filesystem, or migrations found on filesystem with a version inferior to the last one applied but not applied. by default this is set to true

Queries the database for the last applied migration, returns None if there aren’t applied Migrations

Queries the database asychronously for the last applied migration, returns None if there aren’t applied Migrations

Queries the database for all previous applied migrations

Queries the database asynchronously for all previous applied migrations

Runs the Migrations in the supplied database connection

Runs the Migrations asynchronously in the supplied database connection

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.