add sqlite database creation migrations
This commit is contained in:
parent
ee9e682d9e
commit
307419d37f
2 changed files with 27 additions and 0 deletions
|
@ -22,10 +22,12 @@ impl DataBase {
|
|||
}
|
||||
|
||||
let pool = SqlitePool::connect("sqlite:gunnhildr.db").await.unwrap();
|
||||
|
||||
sqlx::migrate!("migrations/sqlite")
|
||||
.run(&pool)
|
||||
.await
|
||||
.expect("Failed to apply migration!");
|
||||
info!("Applied migrations.");
|
||||
|
||||
Self::Sqlite(pool)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue