From e2cb0f86fe72c0f00335d7917ad23a5dd18d6e29 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 27 Jun 2014 03:17:12 +0300 Subject: [PATCH] Remove sqlalchemy-migrate imports from the codebase. Do not touch tests yet. --- mediagoblin/db/migrations.py | 2 +- mediagoblin/db/models.py | 8 -------- mediagoblin/plugins/oauth/models.py | 4 ---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index dd96c3f3..b3cea871 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -25,7 +25,7 @@ from sqlalchemy import (MetaData, Table, Column, Boolean, SmallInteger, from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.sql import and_ -from migrate.changeset.constraint import UniqueConstraint +from sqlalchemy.schema import UniqueConstraint from mediagoblin.db.extratypes import JSONEncoded, MutationDict diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 4b2fb632..d3d1ec4b 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -42,17 +42,9 @@ from mediagoblin.tools.common import import_component import six -# It's actually kind of annoying how sqlalchemy-migrate does this, if -# I understand it right, but whatever. Anyway, don't remove this :P -# -# We could do migration calls more manually instead of relying on -# this import-based meddling... -from migrate import changeset - _log = logging.getLogger(__name__) - class User(Base, UserMixin): """ TODO: We should consider moving some rarely used fields diff --git a/mediagoblin/plugins/oauth/models.py b/mediagoblin/plugins/oauth/models.py index 439424d3..3fe562a2 100644 --- a/mediagoblin/plugins/oauth/models.py +++ b/mediagoblin/plugins/oauth/models.py @@ -26,10 +26,6 @@ from mediagoblin.db.models import User from mediagoblin.plugins.oauth.tools import generate_identifier, \ generate_secret, generate_token, generate_code, generate_refresh_token -# Don't remove this, I *think* it applies sqlalchemy-migrate functionality onto -# the models. -from migrate import changeset - class OAuthClient(Base): __tablename__ = 'oauth__client' -- 2.25.1