Tweaks
This commit is contained in:
parent
6d7bcb35e5
commit
cd43222280
@ -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>;
|
fn into_schema_manager_connection(self) -> SchemaManagerConnection<'c>;
|
||||||
}
|
}
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
#[cfg(feature = "cli")]
|
#[cfg(feature = "cli")]
|
||||||
pub mod cli;
|
pub mod cli;
|
||||||
|
pub mod connection;
|
||||||
pub mod manager;
|
pub mod manager;
|
||||||
pub mod manager_connection;
|
|
||||||
pub mod migrator;
|
pub mod migrator;
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
pub mod seaql_migrations;
|
pub mod seaql_migrations;
|
||||||
pub mod util;
|
pub mod util;
|
||||||
|
|
||||||
|
pub use connection::*;
|
||||||
pub use manager::*;
|
pub use manager::*;
|
||||||
pub use manager_connection::*;
|
|
||||||
pub use migrator::*;
|
pub use migrator::*;
|
||||||
|
|
||||||
pub use async_trait;
|
pub use async_trait;
|
||||||
|
@ -119,7 +119,7 @@ async fn run_migration(url: &str, db_name: &str, schema: &str) -> Result<(), DbE
|
|||||||
assert_eq!(
|
assert_eq!(
|
||||||
Migrator::up(db, None).await,
|
Migrator::up(db, None).await,
|
||||||
Err(DbErr::Migration(
|
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!(
|
assert_eq!(
|
||||||
Migrator::down(db, None).await,
|
Migrator::down(db, None).await,
|
||||||
Err(DbErr::Migration(
|
Err(DbErr::Migration(
|
||||||
"Aboard migration and rollback changes".into()
|
"Abort migration and rollback changes".into()
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ impl MigrationTrait for Migration {
|
|||||||
|
|
||||||
if std::env::var_os("ABORT_MIGRATION").eq(&Some("YES".into())) {
|
if std::env::var_os("ABORT_MIGRATION").eq(&Some("YES".into())) {
|
||||||
return Err(DbErr::Migration(
|
return Err(DbErr::Migration(
|
||||||
"Aboard migration and rollback changes".into(),
|
"Abort migration and rollback changes".into(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ impl MigrationTrait for Migration {
|
|||||||
|
|
||||||
if std::env::var_os("ABORT_MIGRATION").eq(&Some("YES".into())) {
|
if std::env::var_os("ABORT_MIGRATION").eq(&Some("YES".into())) {
|
||||||
return Err(DbErr::Migration(
|
return Err(DbErr::Migration(
|
||||||
"Aboard migration and rollback changes".into(),
|
"Abort migration and rollback changes".into(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user