[][src]Struct refinery::Migration

pub struct Migration { /* fields omitted */ }

Represents a schema migration to be run on the database, this struct is used by the embed_migrations! and include_migration_mods! macros to gather migration files and shouldn't be needed by the user

Implementations

impl Migration[src]

pub fn unapplied(input_name: &str, sql: &str) -> Result<Migration, Error>[src]

Create an unapplied migration, name and version are parsed from the input_name, which must be named in the format (U|V){1}__{2}.rs where {1} represents the migration version and {2} the name.

pub fn version(&self) -> u32[src]

Get the Migration version

pub fn prefix(&self) -> &Type[src]

Get the Prefix

pub fn name(&self) -> &str[src]

Get the Migration Name

pub fn applied_on(&self) -> Option<&DateTime<Local>>[src]

Get the Migration Name

pub fn checksum(&self) -> u64[src]

Get the Migration checksum. Checksum is formed from the name version and sql of the Migration

Trait Implementations

impl Clone for Migration[src]

impl Debug for Migration[src]

impl Display for Migration[src]

impl Eq for Migration[src]

impl Ord for Migration[src]

impl PartialEq<Migration> for Migration[src]

impl PartialOrd<Migration> for Migration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.