migratex 0.2.2

Agnostic migration toolkit library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::sync::Arc;

use sqlx::SqlitePool;

/// Migration context that holds the database connection.
/// This is passed to each migration and used to execute SQL queries.
#[derive(Debug, Clone)]
pub struct MigContext {
    pub db: Arc<SqlitePool>,
}

impl MigContext {
    /// Create a new migration context with the given connection pool.
    pub fn new(db: Arc<SqlitePool>) -> Self {
        Self { db }
    }
}