fix migration

This commit is contained in:
Namekuji 2023-06-02 23:37:36 -04:00
parent 31ac7fb34f
commit dc8ab49a78
4 changed files with 7 additions and 5 deletions

View file

@ -4,7 +4,7 @@ name = "native-utils"
version = "0.0.0"
[workspace]
members = ["migration/Cargo.toml"]
members = ["migration"]
[features]
default = []

View file

@ -10,12 +10,12 @@ path = "src/lib.rs"
[features]
default = []
convert = ["model/noarray"]
convert = ["dep:native-utils"]
[dependencies]
async-std = { version = "1", features = ["attributes", "tokio1"] }
serde_json = "1.0.96"
model = { path = "../model" }
native-utils = { path = "../", optional = true }
indicatif = { version = "0.17.4", features = ["tokio"] }
tokio = { version = "1.28.2", features = ["full"] }
futures = "0.3.28"

View file

@ -18,6 +18,7 @@ impl MigrationTrait for Migration {
DbBackend::Postgres,
Table::drop()
.table(ReversiGame::Table)
.if_exists()
.to_string(PostgresQueryBuilder),
))
.await?;
@ -25,6 +26,7 @@ impl MigrationTrait for Migration {
DbBackend::Postgres,
Table::drop()
.table(ReversiMatching::Table)
.if_exists()
.to_string(PostgresQueryBuilder),
))
.await?;

View file

@ -1,7 +1,7 @@
#![allow(dead_code)]
#![cfg(feature = "convert")]
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use model::entity::newtype::{I32Vec, StringVec};
use native_utils::model::entity::newtype::{I32Vec, StringVec};
use sea_orm_migration::{
prelude::*,
sea_orm::{Database, DbBackend, DbConn, Statement, TryGetable},