--- /dev/null
+From: Eugene Nikanorov <enikanorov@mirantis.com>
+Date: Thu, 10 Apr 2014 09:36:45 +0000 (+0400)
+Subject: Properly apply column default in migration pool_monitor_status
+X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff_plain;h=c7dceedde516170d1a6ac1257103bdacb3b0cc84
+
+Properly apply column default in migration pool_monitor_status
+
+server_default parameter should be used to apply default value at
+table/column creation time. Otherwise non-nullable column can't
+be created because of existing rows in the tables.
+
+Change-Id: I7136e6a0dfb9dc66ca63ff3c9fcf6de164e27e63
+Closes-Bug: #1305725
+---
+
+diff --git a/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py b/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
+index a31bf6a..598f2ab 100644
+--- a/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
++++ b/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
+@@ -45,6 +45,7 @@ def upgrade(active_plugins=None, options=None):
+
+ op.add_column('poolmonitorassociations', sa.Column('status',
+ sa.String(16),
++ server_default='',
+ nullable=False))
+ op.add_column('poolmonitorassociations', sa.Column('status_description',
+ sa.String(255)))
def downgrade(active_plugins=None, options=None):
---- neutron-2014.1~rc1.orig/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
-+++ neutron-2014.1~rc1/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
-@@ -43,9 +43,15 @@ def upgrade(active_plugins=None, options
- if not migration.should_run(active_plugins, migration_for_plugins):
- return
-
-- op.add_column('poolmonitorassociations', sa.Column('status',
-- sa.String(16),
-- nullable=False))
-+ bind = op.get_bind()
-+ engine = bind.engine
-+ if engine.name == 'sqlite':
-+ op.add_column('poolmonitorassociations', sa.Column('status',
-+ sa.String(16)))
-+ else:
-+ op.add_column('poolmonitorassociations', sa.Column('status',
-+ sa.String(16),
-+ nullable=False))
- op.add_column('poolmonitorassociations', sa.Column('status_description',
- sa.String(255)))
-
--- neutron-2014.1~rc1.orig/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py
+++ neutron-2014.1~rc1/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py
@@ -47,11 +47,17 @@ def upgrade(active_plugins=None, options
OVS_lib_defer_apply_doesn_t_handle_concurrency.patch
0001-Add-parameter-and-iptables-rules-to-protect-dnsmasq-.patch
0004-Fix-Metering-doesn-t-respect-the-l3-agent-binding.patch
+Properly_apply_column_default_in_migration_pool_monitor_status.patch