Merge "Avoid imposing alembic 6.0 requirement on all distros"
This commit is contained in:
commit
d280925aa0
@ -46,12 +46,12 @@ def change_uniq(table_name, uniq_name, columns, downgrade=False):
|
||||
# before renaming of constraint.
|
||||
op.drop_constraint('fk_sourceassoc_meter_id',
|
||||
table_name,
|
||||
type_='foreignkey')
|
||||
type='foreignkey')
|
||||
op.drop_constraint('fk_sourceassoc_user_id',
|
||||
table_name,
|
||||
type_='foreignkey')
|
||||
type='foreignkey')
|
||||
if downgrade:
|
||||
op.drop_constraint(uniq_name, table_name=table_name, type_='unique')
|
||||
op.drop_constraint(uniq_name, table_name=table_name, type='unique')
|
||||
else:
|
||||
op.create_unique_constraint(uniq_name, table_name, columns)
|
||||
if engine.name == 'mysql':
|
||||
|
@ -65,7 +65,7 @@ def index_cleanup(engine_names, table_name, uniq_name, columns, create,
|
||||
op.create_index(uniq_name, table_name, columns, unique=unique)
|
||||
else:
|
||||
if unique:
|
||||
op.drop_constraint(uniq_name, table_name, type_='unique')
|
||||
op.drop_constraint(uniq_name, table_name, type='unique')
|
||||
else:
|
||||
op.drop_index(uniq_name, table_name=table_name)
|
||||
|
||||
|
@ -5,7 +5,7 @@ iso8601>=0.1.4
|
||||
argparse
|
||||
SQLAlchemy>=0.7.8,<0.8
|
||||
sqlalchemy-migrate>=0.7.2
|
||||
alembic>=0.6.0
|
||||
alembic>=0.4.1
|
||||
netaddr
|
||||
pymongo>=2.4
|
||||
eventlet>=0.13.0
|
||||
|
Loading…
Reference in New Issue
Block a user