embed_migrations!("./src/state/merkle/sql/migration/postgres/migrations");
use crate::error::InternalError;
use crate::state::merkle::sql::backend::{Connection, Execute, PostgresBackend};
use super::MigrationManager;
#[allow(dead_code)]
pub fn run_migrations(conn: &diesel::pg::PgConnection) -> Result<(), InternalError> {
embedded_migrations::run(conn).map_err(|err| InternalError::from_source(Box::new(err)))?;
debug!("Successfully applied Transact PostgreSQL migrations");
Ok(())
}
impl MigrationManager for PostgresBackend {
fn run_migrations(&self) -> Result<(), InternalError> {
self.execute(|conn| run_migrations(conn.as_inner()))
}
}