embed_migrations!("./src/state/merkle/sql/migration/sqlite/migrations");
use crate::error::InternalError;
use crate::state::merkle::sql::backend::{Connection, SqliteBackend, WriteExclusiveExecute};
use super::MigrationManager;
pub fn run_migrations(conn: &diesel::sqlite::SqliteConnection) -> Result<(), InternalError> {
embedded_migrations::run(conn).map_err(|err| InternalError::from_source(Box::new(err)))?;
debug!("Successfully applied Transact SQLite migrations");
Ok(())
}
impl MigrationManager for SqliteBackend {
fn run_migrations(&self) -> Result<(), InternalError> {
self.execute_write(|conn| run_migrations(conn.as_inner()))
}
}