From 0e154ae3f94b70f4ba9d7dcbba076b3d9ed0dc05 Mon Sep 17 00:00:00 2001 From: EETagent Date: Sun, 30 Oct 2022 12:36:09 +0100 Subject: [PATCH] feat: return migration & now with tokio --- migration/Cargo.toml | 4 +++- migration/src/main.rs | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 migration/src/main.rs diff --git a/migration/Cargo.toml b/migration/Cargo.toml index 794151d..673784b 100644 --- a/migration/Cargo.toml +++ b/migration/Cargo.toml @@ -9,10 +9,12 @@ name = "migration" path = "src/lib.rs" [dependencies] +tokio = { version = "^1.21", features = ["macros"] } + serde = { version = "^1.0", features = ["derive"] } chrono = "^0.4" portfolio-entity = { path = "../entity" } [dependencies.sea-orm-migration] version = "^0.10" -features = [ "runtime-tokio-native-tls", "sqlx-postgres", "sqlx-sqlite"] +features = [ "runtime-tokio-native-tls", "sqlx-postgres", "sqlx-sqlite"] \ No newline at end of file diff --git a/migration/src/main.rs b/migration/src/main.rs new file mode 100644 index 0000000..f054dea --- /dev/null +++ b/migration/src/main.rs @@ -0,0 +1,6 @@ +use sea_orm_migration::prelude::*; + +#[tokio::main] +async fn main() { + cli::run_cli(migration::Migrator).await; +}