Created
November 26, 2017 19:32
-
-
Save anshumanv/b22717181dc7583615d4438ca656b859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!flask/bin/python | |
from migrate.versioning import api | |
from config import SQLALCHEMY_DATABASE_URI | |
from config import SQLALCHEMY_MIGRATE_REPO | |
v = api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) | |
api.downgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO, v - 1) | |
v = api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) | |
print('Current database version: ' + str(v)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment