update readme
This commit is contained in:
parent
626ababdc3
commit
af0978c4e8
@ -22,20 +22,27 @@ pip freeze > requirements.txt
|
|||||||
```
|
```
|
||||||
|
|
||||||
## db cheat:
|
## db cheat:
|
||||||
|
After db schema change:
|
||||||
```
|
```
|
||||||
flask db migrate -m "users table"
|
flask db migrate -m "add users table"
|
||||||
flask db upgrade
|
flask db upgrade
|
||||||
|
```
|
||||||
|
|
||||||
flask db downgrade [base]
|
Dump data if db in good state:
|
||||||
|
```
|
||||||
|
flask db downgrade base
|
||||||
flask db upgrade
|
flask db upgrade
|
||||||
|
```
|
||||||
|
|
||||||
full reset?
|
Full reset:
|
||||||
|
```
|
||||||
rm app.db
|
rm app.db
|
||||||
rm -r migrations
|
rm -r migrations
|
||||||
flask db init
|
flask db init
|
||||||
flask db migrate
|
flask db migrate
|
||||||
flask db upgrade
|
flask db upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
## build notes:
|
## build notes:
|
||||||
|
|
||||||
Dockerfile needs dockerignore or preferably explicitly defined copies for:
|
Dockerfile needs dockerignore or preferably explicitly defined copies for:
|
||||||
|
Loading…
Reference in New Issue
Block a user