working db and tests Nr2

This commit is contained in:
2019-03-14 17:14:05 +01:00
parent 1c8cb55b46
commit bd9b6c61d3
16 changed files with 624 additions and 0 deletions

8
database/db_upgrade.py Normal file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env python
from migrate.versioning import api
from backend.config import SQLALCHEMY_DATABASE_URI
from backend.config import SQLALCHEMY_MIGRATE_REPO
api.upgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)
v = api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)
print('Current database version: ' + str(v))