aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-06-27 03:17:12 +0300
committerBerker Peksag <berker.peksag@gmail.com>2014-06-27 03:17:12 +0300
commite2cb0f86fe72c0f00335d7917ad23a5dd18d6e29 (patch)
tree9df740637daa6073c4b5770400a1f0318c8efd65
parente6aab20dc7b757406d976a468964d917e5b68ce0 (diff)
downloadmediagoblin-e2cb0f86fe72c0f00335d7917ad23a5dd18d6e29.tar.lz
mediagoblin-e2cb0f86fe72c0f00335d7917ad23a5dd18d6e29.tar.xz
mediagoblin-e2cb0f86fe72c0f00335d7917ad23a5dd18d6e29.zip
Remove sqlalchemy-migrate imports from the codebase. Do not touch tests yet.
-rw-r--r--mediagoblin/db/migrations.py2
-rw-r--r--mediagoblin/db/models.py8
-rw-r--r--mediagoblin/plugins/oauth/models.py4
3 files changed, 1 insertions, 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'