diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-10-02 20:16:46 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-10-02 20:18:29 +0300 |
commit | 2ace351bed7c1a03988d3ee60e9e01ab72435ce9 (patch) | |
tree | 45c8d2aff40f0609d7ef9ac7cba9e86cdf347806 /mediagoblin/db/migration_tools.py | |
parent | b36c84e68a4ef709ce5408e321195b4c6a65a867 (diff) | |
download | mediagoblin-2ace351bed7c1a03988d3ee60e9e01ab72435ce9.tar.lz mediagoblin-2ace351bed7c1a03988d3ee60e9e01ab72435ce9.tar.xz mediagoblin-2ace351bed7c1a03988d3ee60e9e01ab72435ce9.zip |
Do not call AlembicMigrationManager.init_tables() for now.
sqlalchemy-migrate will do this for us.
Diffstat (limited to 'mediagoblin/db/migration_tools.py')
-rw-r--r-- | mediagoblin/db/migration_tools.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mediagoblin/db/migration_tools.py b/mediagoblin/db/migration_tools.py index ab4487d2..fae98643 100644 --- a/mediagoblin/db/migration_tools.py +++ b/mediagoblin/db/migration_tools.py @@ -63,15 +63,17 @@ class AlembicMigrationManager(object): Base.metadata.create_all(self.session.bind) # load the Alembic configuration and generate the # version table, "stamping" it with the most recent rev: + # XXX: we need to find a better way to detect current installations + # using sqlalchemy-migrate because we don't have to create all table + # for them command.stamp(self.alembic_cfg, 'head') def init_or_migrate(self, version=None): - if self.get_current_revision() is None: - log.info('Initializing tables and stamping it with ' - 'the most recent migration...') - self.init_tables() - else: - self.upgrade(version) + # XXX: we need to call this method when we ditch + # sqlalchemy-migrate entirely + # if self.get_current_revision() is None: + # self.init_tables() + self.upgrade(version) class MigrationManager(object): |