Trait schemer::Adapter
[−]
[src]
pub trait Adapter { type MigrationType: Migration + ?Sized; type Error: Debug + Fail; fn applied_migrations(&self) -> Result<HashSet<Uuid>, Self::Error>; fn apply_migration(
&mut self,
_: &Self::MigrationType
) -> Result<(), Self::Error>; fn revert_migration(
&mut self,
_: &Self::MigrationType
) -> Result<(), Self::Error>; }
Trait necessary to adapt schemer's migration management to a stateful backend.
Associated Types
type MigrationType: Migration + ?Sized
Type migrations must implement for this adapter.
type Error: Debug + Fail
Type of errors returned by this adapter.
Required Methods
fn applied_migrations(&self) -> Result<HashSet<Uuid>, Self::Error>
Returns the set of IDs for migrations that have been applied.
fn apply_migration(
&mut self,
_: &Self::MigrationType
) -> Result<(), Self::Error>
&mut self,
_: &Self::MigrationType
) -> Result<(), Self::Error>
Apply a single migration.
fn revert_migration(
&mut self,
_: &Self::MigrationType
) -> Result<(), Self::Error>
&mut self,
_: &Self::MigrationType
) -> Result<(), Self::Error>
Revert a single migration.