Skip to content

Commit

Permalink
Merge pull request #43 from SeaQL/migration-prelude
Browse files Browse the repository at this point in the history
Add `migration::prelude`
  • Loading branch information
tyt2y3 authored Feb 7, 2022
2 parents 8aada37 + 9f45a22 commit 4c1023d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/migration/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub mod cli;
pub mod manager;
pub mod migrator;
pub mod prelude;
pub mod seaql_migrations;

pub use cli::*;
Expand Down
10 changes: 10 additions & 0 deletions src/migration/prelude.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub use super::cli;
pub use super::manager::SchemaManager;
pub use super::migrator::MigratorTrait;
pub use super::{MigrationName, MigrationTrait};
pub use async_std;
pub use async_trait;
pub use sea_orm;
pub use sea_orm::sea_query;
pub use sea_orm::sea_query::*;
pub use sea_orm::DbErr;
2 changes: 1 addition & 1 deletion tests/migration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sea_schema::migration::*;
use sea_schema::migration::prelude::*;

mod m20220118_000001_create_cake_table;
mod m20220118_000002_create_fruit_table;
Expand Down
5 changes: 1 addition & 4 deletions tests/migration/src/m20220118_000001_create_cake_table.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use sea_schema::migration::{
sea_query::{self, *},
*,
};
use sea_schema::migration::prelude::*;

pub struct Migration;

Expand Down
7 changes: 2 additions & 5 deletions tests/migration/src/m20220118_000002_create_fruit_table.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use crate::m20220118_000001_create_cake_table::Cake;
use sea_schema::migration::{
sea_orm::DbBackend,
sea_query::{self, *},
*,
};
use sea_orm::DbBackend;
use sea_schema::migration::prelude::*;

pub struct Migration;

Expand Down
2 changes: 1 addition & 1 deletion tests/migration/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sea_schema::migration::*;
use sea_schema::migration::prelude::*;
use sea_schema_migration_test::Migrator;

#[async_std::main]
Expand Down

0 comments on commit 4c1023d

Please sign in to comment.