generate migration by next id number

This commit is contained in:
Daniel Tsvetkov 2020-06-22 17:20:13 +02:00
parent 2aafa40e90
commit 66097014a3
2 changed files with 4 additions and 2 deletions

View File

@ -15,3 +15,4 @@ PaaS - creates easily deployable declarative web applications with (moslty) file
## TODO
* [ ] [vm_gen] Auto generate dependency graph for `view_models/_process_order`
* [ ] [auto_dns] Start and test `auto_dns.service`
* [ ] [migrations] ALTER doesn't work with sqlite3

View File

@ -208,7 +208,8 @@ model() {
db_migrate() {
shift
source venv/bin/activate
python manager.py db migrate
next_id=$(printf "%03d" $(($(ls -la migrations/versions/*.py | wc -l)+1)))
python manager.py db migrate -m "${next_id}"
_post_migrate
}