Reorg table ml2_port_bindings when db migration
For DB2, there are restrictions on table access after ALTER TABLE statements containing REORG-recommended operations. Table will be placed in "reorg pending" state after some continuous alter table operations. Need run reorg table to make the table available. More info refer to: http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp ?topic=%2Fcom.ibm.db2.udb.admin.doc%2Fdoc%2Fc0023297.htm Change-Id: I7fdd61bb4d636d7a3260c0b23152f1f3083cdcfd Fixes: bug #1318498
This commit is contained in:
parent
16c19b13b3
commit
37fbd52f96
@ -65,6 +65,8 @@ def upgrade(active_plugins=None, options=None):
|
|||||||
" vif_details = '{\"port_filter\": false}'"
|
" vif_details = '{\"port_filter\": false}'"
|
||||||
" WHERE cap_port_filter = false")
|
" WHERE cap_port_filter = false")
|
||||||
op.drop_column('ml2_port_bindings', 'cap_port_filter')
|
op.drop_column('ml2_port_bindings', 'cap_port_filter')
|
||||||
|
if op.get_bind().engine.name == 'ibm_db_sa':
|
||||||
|
op.execute("CALL SYSPROC.ADMIN_CMD('REORG TABLE ml2_port_bindings')")
|
||||||
|
|
||||||
|
|
||||||
def downgrade(active_plugins=None, options=None):
|
def downgrade(active_plugins=None, options=None):
|
||||||
@ -93,3 +95,5 @@ def downgrade(active_plugins=None, options=None):
|
|||||||
" cap_port_filter = true"
|
" cap_port_filter = true"
|
||||||
" WHERE vif_details LIKE '%\"port_filter\": true%'")
|
" WHERE vif_details LIKE '%\"port_filter\": true%'")
|
||||||
op.drop_column('ml2_port_bindings', 'vif_details')
|
op.drop_column('ml2_port_bindings', 'vif_details')
|
||||||
|
if op.get_bind().engine.name == 'ibm_db_sa':
|
||||||
|
op.execute("CALL SYSPROC.ADMIN_CMD('REORG TABLE ml2_port_bindings')")
|
||||||
|
Loading…
Reference in New Issue
Block a user