Add migration docs
This commit is contained in:
parent
12aa457e3a
commit
1b5f236674
1 changed files with 8 additions and 0 deletions
|
|
@ -3,7 +3,15 @@
|
|||
## Creating/resetting the Database for development
|
||||
|
||||
```sh
|
||||
rm -rf db.sqlite*
|
||||
sqlx database create --database-url sqlite://db.sqlite3
|
||||
sqlx migrate run --source src/app_state/database/migrations --database-url sqlite://db.sqlite3
|
||||
cargo sqlx prepare --workspace
|
||||
```
|
||||
|
||||
## Updating the DB schema through a migration
|
||||
|
||||
```sh
|
||||
sqlx migrate add --source src/app_state/database/migrations <name>
|
||||
sqlx migrate run --source src/app_state/database/migrations --database-url sqlite://db.sqlite3
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue