Fix missing migration default value
Fix 128e042a2b68_ext_gw_mode and 40b0aff0302e_mlnx_initial migrations by properly using server_default parameter in column definitions. Change-Id: I199e206dccc36fcfc2457a17167c76611d69784a Closes-bug: #1336556
This commit is contained in:
parent
614479c5d5
commit
448295bdac
@ -57,7 +57,7 @@ def upgrade(active_plugins=None, options=None):
|
||||
return
|
||||
|
||||
op.add_column('routers', sa.Column('enable_snat', sa.Boolean(),
|
||||
nullable=False, default=True))
|
||||
nullable=False, server_default="1"))
|
||||
# Set enable_snat to True for existing routers
|
||||
op.execute("UPDATE routers SET enable_snat=True")
|
||||
|
||||
|
@ -122,7 +122,7 @@ def upgrade(active_plugins=None, options=None):
|
||||
)
|
||||
|
||||
op.add_column('routers', sa.Column('enable_snat', sa.Boolean(),
|
||||
nullable=False, default=True))
|
||||
nullable=False, server_default="1"))
|
||||
op.create_table(
|
||||
'securitygroupportbindings',
|
||||
sa.Column('port_id', sa.String(length=36), nullable=False),
|
||||
|
Loading…
Reference in New Issue
Block a user