This commit is contained in:
Chris Tsang 2023-01-28 01:49:46 +08:00
parent 6d7bcb35e5
commit cd43222280
5 changed files with 10 additions and 7 deletions

View File

@ -122,7 +122,10 @@ impl<'c> TransactionTrait for SchemaManagerConnection<'c> {
}
}
pub trait IntoSchemaManagerConnection<'c>: Send {
pub trait IntoSchemaManagerConnection<'c>: Send
where
Self: 'c,
{
fn into_schema_manager_connection(self) -> SchemaManagerConnection<'c>;
}

View File

@ -1,14 +1,14 @@
#[cfg(feature = "cli")]
pub mod cli;
pub mod connection;
pub mod manager;
pub mod manager_connection;
pub mod migrator;
pub mod prelude;
pub mod seaql_migrations;
pub mod util;
pub use connection::*;
pub use manager::*;
pub use manager_connection::*;
pub use migrator::*;
pub use async_trait;

View File

@ -119,7 +119,7 @@ async fn run_migration(url: &str, db_name: &str, schema: &str) -> Result<(), DbE
assert_eq!(
Migrator::up(db, None).await,
Err(DbErr::Migration(
"Aboard migration and rollback changes".into()
"Abort migration and rollback changes".into()
))
);
@ -158,7 +158,7 @@ async fn run_migration(url: &str, db_name: &str, schema: &str) -> Result<(), DbE
assert_eq!(
Migrator::down(db, None).await,
Err(DbErr::Migration(
"Aboard migration and rollback changes".into()
"Abort migration and rollback changes".into()
))
);

View File

@ -30,7 +30,7 @@ impl MigrationTrait for Migration {
if std::env::var_os("ABORT_MIGRATION").eq(&Some("YES".into())) {
return Err(DbErr::Migration(
"Aboard migration and rollback changes".into(),
"Abort migration and rollback changes".into(),
));
}

View File

@ -20,7 +20,7 @@ impl MigrationTrait for Migration {
if std::env::var_os("ABORT_MIGRATION").eq(&Some("YES".into())) {
return Err(DbErr::Migration(
"Aboard migration and rollback changes".into(),
"Abort migration and rollback changes".into(),
));
}