working db and tests Nr2
This commit is contained in:
8
database/db_upgrade.py
Normal file
8
database/db_upgrade.py
Normal 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))
|
||||
Reference in New Issue
Block a user