Migration without depending on async-std (#758)

* Migration without depending on async-std runtime

* Update examples

* Fixup
This commit is contained in:
Billy Chan 2022-05-23 23:24:07 +08:00 committed by GitHub
parent 3f90c09407
commit 183639dc8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 51 additions and 3 deletions

View File

@ -10,7 +10,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-async-std-native-tls",
# "sqlx-mysql",
]

View File

@ -10,7 +10,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-actix-native-tls",
# "sqlx-mysql",
]

View File

@ -10,7 +10,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
# "sqlx-postgres",
]

View File

@ -11,7 +11,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
dotenv = "0.15.0" dotenv = "0.15.0"
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
# "sqlx-sqlite",
]

View File

@ -10,7 +10,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
# "sqlx-sqlite",
]

View File

@ -10,7 +10,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
# "sqlx-sqlite",
]

View File

@ -11,7 +11,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
rocket = { version = "0.5.0-rc.1" } rocket = { version = "0.5.0-rc.1" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
# "sqlx-postgres",
]

View File

@ -10,7 +10,13 @@ path = "src/lib.rs"
[dependencies] [dependencies]
entity = { path = "../entity" } entity = { path = "../entity" }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration] [dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0" version = "^0.8.0"
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-rustls",
# "sqlx-postgres",
]

View File

@ -18,7 +18,6 @@ name = "sea_orm_migration"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
async-std = { version = "^1", features = ["attributes", "tokio1"] }
async-trait = { version = "^0.1" } async-trait = { version = "^0.1" }
clap = { version = "^2.33" } clap = { version = "^2.33" }
dotenv = { version = "^0.15" } dotenv = { version = "^0.15" }
@ -28,6 +27,9 @@ sea-schema = { version = "^0.8.0" }
tracing = { version = "0.1", features = ["log"] } tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[dev-dependencies]
async-std = { version = "^1", features = ["attributes", "tokio1"] }
[features] [features]
sqlx-mysql = ["sea-orm/sqlx-mysql"] sqlx-mysql = ["sea-orm/sqlx-mysql"]
sqlx-postgres = ["sea-orm/sqlx-postgres"] sqlx-postgres = ["sea-orm/sqlx-postgres"]

View File

@ -7,7 +7,6 @@ pub mod seaql_migrations;
pub use manager::*; pub use manager::*;
pub use migrator::*; pub use migrator::*;
pub use async_std;
pub use async_trait; pub use async_trait;
pub use sea_orm; pub use sea_orm;
pub use sea_orm::sea_query; pub use sea_orm::sea_query;

View File

@ -2,7 +2,6 @@ pub use super::cli;
pub use super::manager::SchemaManager; pub use super::manager::SchemaManager;
pub use super::migrator::MigratorTrait; pub use super::migrator::MigratorTrait;
pub use super::{MigrationName, MigrationTrait}; pub use super::{MigrationName, MigrationTrait};
pub use async_std;
pub use async_trait; pub use async_trait;
pub use sea_orm; pub use sea_orm;
pub use sea_orm::sea_query; pub use sea_orm::sea_query;