From 448295bdaca0e7794f93bc01c9c736535925c8e2 Mon Sep 17 00:00:00 2001 From: Sergey Kolekonov Date: Mon, 7 Jul 2014 19:22:25 +0400 Subject: [PATCH] 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 --- .../alembic_migrations/versions/128e042a2b68_ext_gw_mode.py | 2 +- .../alembic_migrations/versions/40b0aff0302e_mlnx_initial.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py b/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py index 59ef4090c2..644c5b0319 100644 --- a/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py +++ b/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py @@ -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") diff --git a/neutron/db/migration/alembic_migrations/versions/40b0aff0302e_mlnx_initial.py b/neutron/db/migration/alembic_migrations/versions/40b0aff0302e_mlnx_initial.py index 7da75d9274..fd815feba5 100644 --- a/neutron/db/migration/alembic_migrations/versions/40b0aff0302e_mlnx_initial.py +++ b/neutron/db/migration/alembic_migrations/versions/40b0aff0302e_mlnx_initial.py @@ -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),