use sqlx::migrate::MigrateError; use sqlx::{Pool, Sqlite}; pub async fn run_migrations(pool: &Pool) -> Result<(), MigrateError> { match sqlx::migrate!("../database/migrations").run(pool).await { Ok(ok) => { println!("Migrations are OK"); Ok(ok) } Err(e) => { eprintln!("Failed to run migrations!"); Err(e) } } }