diff options
author | iElectric <unknown> | 2010-04-24 21:40:16 +0200 |
---|---|---|
committer | iElectric <unknown> | 2010-04-24 21:40:16 +0200 |
commit | e4868841d5922f6313821ff49d3e70426816d4fb (patch) | |
tree | 76d8c2f33abffa261f665d2c18affdf6d8a3e4c6 /migrate/versioning | |
parent | 42ab0ba79630b0820c55d9f2cbe85492b307f160 (diff) | |
download | sqalchemy-migrate-e4868841d5922f6313821ff49d3e70426816d4fb.tar.gz |
partly fix SA0.6 tests on postgres
Diffstat (limited to 'migrate/versioning')
-rw-r--r-- | migrate/versioning/genmodel.py | 8 | ||||
-rw-r--r-- | migrate/versioning/schema.py | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/migrate/versioning/genmodel.py b/migrate/versioning/genmodel.py index 1715175..066e0c9 100644 --- a/migrate/versioning/genmodel.py +++ b/migrate/versioning/genmodel.py @@ -9,9 +9,11 @@ import sys import logging -import migrate import sqlalchemy +import migrate +import migrate.changeset + log = logging.getLogger(__name__) HEADER = """ @@ -37,7 +39,6 @@ class ModelGenerator(object): self.diff = diff self.declarative = declarative - def column_repr(self, col): kwarg = [] if col.key != col.name: @@ -174,9 +175,6 @@ class ModelGenerator(object): def applyModel(self): """Apply model to current database.""" - # Yuck! We have to import from changeset to apply the - # monkey-patch to allow column adding/dropping. - from migrate.changeset import schema def dbCanHandleThisChange(missingInDatabase, missingInModel, diffDecl): if missingInDatabase and not missingInModel and not diffDecl: diff --git a/migrate/versioning/schema.py b/migrate/versioning/schema.py index 8014bcb..eb3beba 100644 --- a/migrate/versioning/schema.py +++ b/migrate/versioning/schema.py @@ -45,9 +45,9 @@ class ControlledSchema(object): self.table.c.repository_id == str(self.repository.id))) data = list(result)[0] - except Exception: + except: cls, exc, tb = sys.exc_info() - raise exceptions.DatabaseNotControlledError, exc.message, tb + raise exceptions.DatabaseNotControlledError, exc.__str__(), tb self.version = data['version'] return data |