tern_core::migration

Trait MigrationSource

Source
pub trait MigrationSource {
    type Ctx: MigrationContext;

    // Required method
    fn migration_set(
        &self,
        latest_version: Option<i64>,
    ) -> MigrationSet<Self::Ctx>;
}
Expand description

A type that is used to collect a MigrationSet – migrations that are not applied yet – which is used as the input to runner commands.

Required Associated Types§

Source

type Ctx: MigrationContext

A migration context needed to collect migration sets.

Required Methods§

Source

fn migration_set(&self, latest_version: Option<i64>) -> MigrationSet<Self::Ctx>

The set of migrations since the last apply.

Implementors§