From 66097014a3195491e932d1c157c6f6b5002a0b07 Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Mon, 22 Jun 2020 17:20:13 +0200 Subject: [PATCH] generate migration by next id number --- README.md | 3 ++- oshipka.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8967fa..aa347b6 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,5 @@ 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` \ No newline at end of file +* [ ] [auto_dns] Start and test `auto_dns.service` +* [ ] [migrations] ALTER doesn't work with sqlite3 \ No newline at end of file diff --git a/oshipka.sh b/oshipka.sh index 1ca349f..ee0a15a 100755 --- a/oshipka.sh +++ b/oshipka.sh @@ -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 }