wsb 0.196.4203

Workspace - A tool suite for file operations, version management, and development workflow automation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::prelude::*;
use r2d2_sqlite::SqliteConnectionManager;
use refinery::embed_migrations;

embed_migrations!("migrations");

pub fn run_migrations(
    mut conn: r2d2::PooledConnection<SqliteConnectionManager>,
) -> anyhow::Result<()> {
    migrations::runner()
        .run(&mut *conn)
        .map_err(|e| anyhow::anyhow!("Migration failed: {}", e))?;

    tracing::debug!("Database migrations completed");
    Ok(())
}