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.
|
# before renaming of constraint.
|
||||||
op.drop_constraint('fk_sourceassoc_meter_id',
|
op.drop_constraint('fk_sourceassoc_meter_id',
|
||||||
table_name,
|
table_name,
|
||||||
type_='foreignkey')
|
type='foreignkey')
|
||||||
op.drop_constraint('fk_sourceassoc_user_id',
|
op.drop_constraint('fk_sourceassoc_user_id',
|
||||||
table_name,
|
table_name,
|
||||||
type_='foreignkey')
|
type='foreignkey')
|
||||||
if downgrade:
|
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:
|
else:
|
||||||
op.create_unique_constraint(uniq_name, table_name, columns)
|
op.create_unique_constraint(uniq_name, table_name, columns)
|
||||||
if engine.name == 'mysql':
|
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)
|
op.create_index(uniq_name, table_name, columns, unique=unique)
|
||||||
else:
|
else:
|
||||||
if unique:
|
if unique:
|
||||||
op.drop_constraint(uniq_name, table_name, type_='unique')
|
op.drop_constraint(uniq_name, table_name, type='unique')
|
||||||
else:
|
else:
|
||||||
op.drop_index(uniq_name, table_name=table_name)
|
op.drop_index(uniq_name, table_name=table_name)
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ iso8601>=0.1.4
|
|||||||
argparse
|
argparse
|
||||||
SQLAlchemy>=0.7.8,<0.8
|
SQLAlchemy>=0.7.8,<0.8
|
||||||
sqlalchemy-migrate>=0.7.2
|
sqlalchemy-migrate>=0.7.2
|
||||||
alembic>=0.6.0
|
alembic>=0.4.1
|
||||||
netaddr
|
netaddr
|
||||||
pymongo>=2.4
|
pymongo>=2.4
|
||||||
eventlet>=0.13.0
|
eventlet>=0.13.0
|
||||||
|
Loading…
Reference in New Issue
Block a user