Fix deprecated Alembic function args
create_index and create_foreign_key were using long-deprecated argument names which were finally removed as of 1.5.0: https://alembic.sqlalchemy.org/en/latest/changelog.html#change-da0bea3199b905783ddbd0cde968beec Change-Id: I03405e3d0daf085d0849a6e3effc65ec05ceb7a1
This commit is contained in:
parent
95e06997a2
commit
0f7c6e94a9
|
@ -41,17 +41,17 @@ def _get_indexes():
|
|||
# up and fetched, so attempt to ensure that that is done quickly.
|
||||
indexes = [
|
||||
{
|
||||
'name': 'logbook_uuid_idx',
|
||||
'index_name': 'logbook_uuid_idx',
|
||||
'table_name': 'logbooks',
|
||||
'columns': ['uuid'],
|
||||
},
|
||||
{
|
||||
'name': 'flowdetails_uuid_idx',
|
||||
'index_name': 'flowdetails_uuid_idx',
|
||||
'table_name': 'flowdetails',
|
||||
'columns': ['uuid'],
|
||||
},
|
||||
{
|
||||
'name': 'taskdetails_uuid_idx',
|
||||
'index_name': 'taskdetails_uuid_idx',
|
||||
'table_name': 'taskdetails',
|
||||
'columns': ['uuid'],
|
||||
},
|
||||
|
@ -63,18 +63,18 @@ def _get_foreign_keys():
|
|||
f_keys = [
|
||||
# Flow details uuid -> logbook parent uuid
|
||||
{
|
||||
'name': 'flowdetails_ibfk_1',
|
||||
'source': 'flowdetails',
|
||||
'referent': 'logbooks',
|
||||
'constraint_name': 'flowdetails_ibfk_1',
|
||||
'source_table': 'flowdetails',
|
||||
'referent_table': 'logbooks',
|
||||
'local_cols': ['parent_uuid'],
|
||||
'remote_cols': ['uuid'],
|
||||
'ondelete': 'CASCADE',
|
||||
},
|
||||
# Task details uuid -> flow details parent uuid
|
||||
{
|
||||
'name': 'taskdetails_ibfk_1',
|
||||
'source': 'taskdetails',
|
||||
'referent': 'flowdetails',
|
||||
'constraint_name': 'taskdetails_ibfk_1',
|
||||
'source_table': 'taskdetails',
|
||||
'referent_table': 'flowdetails',
|
||||
'local_cols': ['parent_uuid'],
|
||||
'remote_cols': ['uuid'],
|
||||
'ondelete': 'CASCADE',
|
||||
|
|
Loading…
Reference in New Issue