From aa8afbf7febbf26d49001061351b6cdc8d51b78f Mon Sep 17 00:00:00 2001 From: Drew Fisher Date: Wed, 12 Mar 2014 10:45:10 -0700 Subject: [PATCH] avoid name conflict on 'api' --- imoo/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imoo/__init__.py b/imoo/__init__.py index fda60a1..99d8987 100644 --- a/imoo/__init__.py +++ b/imoo/__init__.py @@ -4,7 +4,7 @@ from flask import Flask 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. @@ -22,13 +22,13 @@ def migrate_database(app): # 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 -- 2.39.2