from flask.ext.login import LoginManager
from flask.ext.sqlalchemy import SQLAlchemy
from flask_wtf.csrf import CsrfProtect
-from migrate.versioning import api
+import migrate.versioning.api as migrate_api
from migrate.exceptions import DatabaseAlreadyControlledError
# Login manager.
# If the DB isn't under version control yet, add the migrate_version table
# at version 0
try:
- api.version_control(db_uri, repo)
+ migrate_api.version_control(db_uri, repo)
except DatabaseAlreadyControlledError:
# we already own the DB
pass
# Apply all known migrations to bring the database schema up to date
- api.upgrade(db_uri, repo, api.version(repo))
+ migrate_api.upgrade(db_uri, repo, migrate_api.version(repo))
from imoo import views