Removed a binary migration crate

This commit is contained in:
2023-06-11 13:00:27 +03:00
parent cc02d91c03
commit 2f2ab35b2b
5 changed files with 4 additions and 2301 deletions

2181
migration/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,5 @@ tokio = { version = "1.28.1", features = ["macros", "rt"] }
[dependencies.sea-orm-migration]
version = "0.11.3"
features = [
"runtime-tokio-rustls",
"sqlx-mysql",
]
features = ["runtime-tokio-rustls", "sqlx-mysql"]
default-features = false

View File

@ -1,41 +0,0 @@
# Running Migrator CLI
- Generate a new migration file
```sh
cargo run -- migrate generate MIGRATION_NAME
```
- Apply all pending migrations
```sh
cargo run
```
```sh
cargo run -- up
```
- Apply first 10 pending migrations
```sh
cargo run -- up -n 10
```
- Rollback last applied migrations
```sh
cargo run -- down
```
- Rollback last 10 applied migrations
```sh
cargo run -- down -n 10
```
- Drop all tables from the database, then reapply all migrations
```sh
cargo run -- fresh
```
- Rollback all applied migrations, then reapply all migrations
```sh
cargo run -- refresh
```
- Rollback all applied migrations
```sh
cargo run -- reset
```
- Check the status of all migrations
```sh
cargo run -- status
```

View File

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