schemamama::migration! [] [src]

macro_rules! migration {
    ($ty:ident, $version:expr, $description:expr) => { ... };
}

Efficiently implement the Migration trait for a given type.

Example

struct MyMigration;
migration!(MyMigration, 100, "create some lovely database tables");

use schemamama::Migration;
let m = MyMigration;
assert_eq!(m.version(), 100);
assert_eq!(m.description(), "create some lovely database tables");