Made migration binary use tokio instead of async-std to reduce the amount of dependencies

This commit is contained in:
2023-05-07 14:32:17 +03:00
parent 8d68cb5b2b
commit bc08ebed03
4 changed files with 8 additions and 306 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "migration"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
publish = false
@ -9,14 +9,11 @@ name = "migration"
path = "src/lib.rs"
[dependencies]
async-std = { version = "1", features = ["attributes", "tokio1"] }
tokio = { version = "1.28.0", features = ["macros", "rt"] }
[dependencies.sea-orm-migration]
version = "0.11.0"
features = [
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
# e.g.
"runtime-tokio-rustls", # `ASYNC_RUNTIME` feature
"sqlx-mysql", # `DATABASE_DRIVER` feature
"runtime-tokio-rustls",
"sqlx-mysql",
]

View File

@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;
#[async_std::main]
#[tokio::main(flavor = "current_thread")]
async fn main() {
cli::run_cli(migration::Migrator).await;
}