pub trait DynMigration {
// Required methods
fn app_name(&self) -> &str;
fn name(&self) -> &str;
fn dependencies(&self) -> &[MigrationDependency];
fn operations(&self) -> &[Operation];
}Available on crate feature
db only.Expand description
A trait for defining a migration that can be dynamically applied.
This is mostly useful for use in the MigrationEngine to allow
migrations to be dynamically loaded from multiple apps. This can also be
used to implement custom migration loading logic, or to implement
migrations that are not statically defined.
This trait has a blanket implementation for types that implement
Migration.
Required Methods§
Sourcefn dependencies(&self) -> &[MigrationDependency]
fn dependencies(&self) -> &[MigrationDependency]
The list of dependencies of the migration.
Sourcefn operations(&self) -> &[Operation]
fn operations(&self) -> &[Operation]
The list of operations to apply in the migration.
Trait Implementations§
Source§impl DynMigration for &dyn DynMigration
impl DynMigration for &dyn DynMigration
Source§fn dependencies(&self) -> &[MigrationDependency]
fn dependencies(&self) -> &[MigrationDependency]
The list of dependencies of the migration.
Source§fn operations(&self) -> &[Operation]
fn operations(&self) -> &[Operation]
The list of operations to apply in the migration.
Source§impl DynMigration for Box<dyn DynMigration>
impl DynMigration for Box<dyn DynMigration>
Source§fn dependencies(&self) -> &[MigrationDependency]
fn dependencies(&self) -> &[MigrationDependency]
The list of dependencies of the migration.
Source§fn operations(&self) -> &[Operation]
fn operations(&self) -> &[Operation]
The list of operations to apply in the migration.
Implementations on Foreign Types§
Source§impl DynMigration for Box<SyncDynMigration>
impl DynMigration for Box<SyncDynMigration>
Source§impl DynMigration for Box<dyn DynMigration>
impl DynMigration for Box<dyn DynMigration>
Implementors§
impl DynMigration for &SyncDynMigration
impl DynMigration for &dyn DynMigration
impl DynMigration for TestMigration
Available on crate feature
test only.