Ensure migrate script pass on newer MySQL

MySQL 5.7 do not allow PK values defaults to NULL which fails the
migration step and the following message is prompted.

 'All parts of a PRIMARY KEY must be NOT NULL;
  if you need NULL in a key, use UNIQUE instead'

Also refer to #1567899 for more detail.

Change-Id: Ia16405cd593a0a67e7c7ae68a3977b74cc673d0b
This commit is contained in:
Zhongcheng Lao 2016-05-25 16:38:52 +08:00
parent 6b70244374
commit 8a31b31035
2 changed files with 4 additions and 2 deletions

View File

@ -40,4 +40,5 @@ def upgrade():
'tz_network_bindings',
'binding_type',
type_=new_tz_binding_type_enum,
existing_type=old_tz_binding_type_enum)
existing_type=old_tz_binding_type_enum,
existing_nullable=False)

View File

@ -40,4 +40,5 @@ def upgrade():
'nsxv_tz_network_bindings',
'binding_type',
type_=new_tz_binding_type_enum,
existing_type=tz_binding_type_enum)
existing_type=tz_binding_type_enum,
existing_nullable=False)