File: README.md

package info (click to toggle)
shortwave 5.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,844 kB
  • sloc: sh: 98; sql: 63; makefile: 22
file content (18 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Manage the database with diesel_cli

1. Install the diesel_cli tool 
`cargo install diesel_cli`

2. Create empty database file
`touch shortwave.db`

3. Create new migration
`diesel migration generate station_uuid --database-url=./shortwave.db --migration-dir=./data/database/migrations/`

4. List all migrations
`diesel migration list --database-url=./shortwave.db --migration-dir=./data/database/migrations/`

5. Run the migrations (onto the shortwave.db file)
`diesel migration run --database-url=./shortwave.db --migration-dir=./data/database/migrations/`

*Note: All of those commands are getting executed from the project root folder*