fix migration
This commit is contained in:
parent
d3d30bbbc2
commit
afe4c76392
|
@ -4,7 +4,7 @@ name = "native-utils"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["migration/Cargo.toml"]
|
members = ["migration"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
|
@ -10,12 +10,12 @@ path = "src/lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
convert = ["model/noarray"]
|
convert = ["dep:native-utils"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
||||||
serde_json = "1.0.96"
|
serde_json = "1.0.96"
|
||||||
model = { path = "../model" }
|
native-utils = { path = "../", optional = true }
|
||||||
indicatif = { version = "0.17.4", features = ["tokio"] }
|
indicatif = { version = "0.17.4", features = ["tokio"] }
|
||||||
tokio = { version = "1.28.2", features = ["full"] }
|
tokio = { version = "1.28.2", features = ["full"] }
|
||||||
futures = "0.3.28"
|
futures = "0.3.28"
|
||||||
|
|
|
@ -18,6 +18,7 @@ impl MigrationTrait for Migration {
|
||||||
DbBackend::Postgres,
|
DbBackend::Postgres,
|
||||||
Table::drop()
|
Table::drop()
|
||||||
.table(ReversiGame::Table)
|
.table(ReversiGame::Table)
|
||||||
|
.if_exists()
|
||||||
.to_string(PostgresQueryBuilder),
|
.to_string(PostgresQueryBuilder),
|
||||||
))
|
))
|
||||||
.await?;
|
.await?;
|
||||||
|
@ -25,6 +26,7 @@ impl MigrationTrait for Migration {
|
||||||
DbBackend::Postgres,
|
DbBackend::Postgres,
|
||||||
Table::drop()
|
Table::drop()
|
||||||
.table(ReversiMatching::Table)
|
.table(ReversiMatching::Table)
|
||||||
|
.if_exists()
|
||||||
.to_string(PostgresQueryBuilder),
|
.to_string(PostgresQueryBuilder),
|
||||||
))
|
))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![allow(dead_code)]
|
#![cfg(feature = "convert")]
|
||||||
|
|
||||||
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
|
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
|
||||||
use model::entity::newtype::{I32Vec, StringVec};
|
use native_utils::model::entity::newtype::{I32Vec, StringVec};
|
||||||
use sea_orm_migration::{
|
use sea_orm_migration::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
sea_orm::{Database, DbBackend, DbConn, Statement, TryGetable},
|
sea_orm::{Database, DbBackend, DbConn, Statement, TryGetable},
|
||||||
|
|
Loading…
Reference in New Issue