You've already forked seamantic
18 lines
531 B
Rust
18 lines
531 B
Rust
//! This example shows how to use `seamantic::migrations!` and how to
|
|
//! make a migration with the sqlite schema helpers
|
|
|
|
use sea_orm::{ConnectOptions, Database};
|
|
use sea_orm_migration::MigratorTrait;
|
|
|
|
seamantic::migrations! {
|
|
"seaql_migrations_test";
|
|
m_01,
|
|
}
|
|
|
|
#[tokio::main(flavor = "current_thread")]
|
|
async fn main() {
|
|
let options = ConnectOptions::new("sqlite:/tmp/db?mode=memory");
|
|
let database = Database::connect(options).await.expect("Database::connect");
|
|
Migrator::up(&database, None).await.expect("Migrator::up");
|
|
}
|