Trait Migration

Source
pub trait Migration {
    // Required methods
    fn id(&self) -> Uuid;
    fn dependencies(&self) -> HashSet<Uuid>;
    fn description(&self) -> &'static str;
}
Expand description

Metadata for defining the identity and dependence relations of migrations. Specific adapters require additional traits for actual application and reversion of migrations.

Required Methods§

Source

fn id(&self) -> Uuid

Unique identifier for this migration.

Source

fn dependencies(&self) -> HashSet<Uuid>

Set of IDs of all direct dependencies of this migration.

Source

fn description(&self) -> &'static str

User-targeted description of this migration.

Implementors§