mirror of
https://git.alemi.dev/dashboard.git
synced 2024-11-22 23:44:55 +01:00
alemi
cbca9f99b3
this mostly has the objective of splitting fetching and visualizing, to be able to daemonize the fetching. I swapped out ureq for reqwest, brought in clap, removed rusqlite for full fledged sea_orm, added tokio. Created migrations in sea_orm to reflect current db schema. Moved data structures defititions out of app, and slimmed down gui code. Entities collections are mostly managed by background workers and made available with watch-channels to the main thread, which can always nonblockingly access data. This is cool but still has some sharp corners. Now plots don't refresh live but at specific interval. I plan to add synchronization channels later on tho.
41 lines
829 B
Markdown
41 lines
829 B
Markdown
# 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
|
|
```
|