diff --git a/src/db.rs b/src/db.rs index cc17c75..3e3cd47 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1,7 +1,6 @@ use std::time::Duration; use sqlx::{ - migrate::Migrator, sqlite::{SqliteConnectOptions, SqliteJournalMode, SqlitePoolOptions}, SqlitePool, }; @@ -73,10 +72,7 @@ pub fn get_db_pool() -> SqlitePool { .build() .unwrap(); - let m = Migrator::new(std::path::Path::new("./migrations")); - let mut m = rt.block_on(m).unwrap(); - let m = m.set_locking(false); - rt.block_on(m.run(&pool)).unwrap(); + rt.block_on(sqlx::migrate!().run(&pool)).unwrap(); tracing::info!("Ran migrations"); }