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:
Sergey Kolekonov 2014-07-07 19:22:25 +04:00 committed by enikanorov
parent 614479c5d5
commit 448295bdac
2 changed files with 2 additions and 2 deletions

View File

@ -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")

View File

@ -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),