add sqlite database creation migrations

This commit is contained in:
Milim 2024-12-07 10:04:34 +01:00
parent ee9e682d9e
commit 307419d37f
No known key found for this signature in database
2 changed files with 27 additions and 0 deletions

View file

@ -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)
}