Enable alembic as the main tool for migrations

Enable alembic for all migrations and limit the max number of
sqlalchemy-migration migration. All new migrations must now be in
Alembic!
This commit is contained in:
Boris Bobrov 2015-11-07 16:57:22 +03:00 committed by Christopher Allan Webber
parent 8da8c0ac2d
commit 2b68834c44
2 changed files with 9 additions and 8 deletions

View File

@ -317,6 +317,8 @@ class RegisterMigration(object):
assert migration_number > 0, "Migration number must be > 0!"
assert migration_number not in migration_registry, \
"Duplicate migration numbers detected! That's not allowed!"
assert migration_number <= 44, ('Alembic should be used for '
'new migrations')
self.migration_number = migration_number
self.migration_registry = migration_registry

View File

@ -130,7 +130,6 @@ def run_dbupdate(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)