diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-22 14:05:36 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-22 14:09:59 -0500 |
commit | c2059c4a7457fa8c752965e705b9d52e2b206610 (patch) | |
tree | 1e67d1090e7b3bf1c277cf4ca96a27049f783d45 | |
parent | a6252cbf211691aa9d81fd535f5af7bcdbbd6620 (diff) | |
download | mediagoblin-c2059c4a7457fa8c752965e705b9d52e2b206610.tar.lz mediagoblin-c2059c4a7457fa8c752965e705b9d52e2b206610.tar.xz mediagoblin-c2059c4a7457fa8c752965e705b9d52e2b206610.zip |
Making alembic happen with python 3 only... for now.
We want to make sure it works nicely first.
-rw-r--r-- | mediagoblin/gmg_commands/dbupdate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mediagoblin/gmg_commands/dbupdate.py b/mediagoblin/gmg_commands/dbupdate.py index f5c20720..31827cd0 100644 --- a/mediagoblin/gmg_commands/dbupdate.py +++ b/mediagoblin/gmg_commands/dbupdate.py @@ -16,6 +16,7 @@ import logging +import six from sqlalchemy.orm import sessionmaker from mediagoblin.db.open import setup_connection_and_db_from_config @@ -125,7 +126,11 @@ def run_dbupdate(app_config, global_config): db = setup_connection_and_db_from_config(app_config, migrations=True) # Run the migrations run_all_migrations(db, app_config, global_config) - run_alembic_migrations(db, app_config, global_config) + + # TODO: Make this happen regardless of python 2 or 3 once ensured + # to be "safe"! + if six.PY3: + run_alembic_migrations(db, app_config, global_config) def run_all_migrations(db, app_config, global_config): |