From 1cffada5e956c7b17296a32b255819117cd410fe Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Thu, 13 Sep 2018 12:10:32 +0200 Subject: [PATCH] [#89,!22] Auto increment option id. --- src/share/database/scripts/mysql/dhcpdb_create.mysql | 4 ++-- src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 63c30f9c3a..a3a2d6500e 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -999,7 +999,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_subnet_server ( # Modify the primary key to BINGINT as other tables have. -ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL; +ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; # Add conifguration backend specific columns. ALTER TABLE dhcp4_options @@ -1251,7 +1251,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_pool ( ) ENGINE=InnoDB; # Modify the primary key to BINGINT as other tables have. -ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL; +ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; # Add conifguration backend specific columns. ALTER TABLE dhcp6_options diff --git a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in index b0d522b8e9..b482afe92d 100644 --- a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in +++ b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in @@ -327,7 +327,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_subnet_server ( # Modify the primary key to BINGINT as other tables have. # -ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL; +ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; # Add conifguration backend specific columns. ALTER TABLE dhcp4_options @@ -562,7 +562,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_pool ( ) ENGINE=InnoDB; # Modify the primary key to BINGINT as other tables have. -ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL; +ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; # Add conifguration backend specific columns. ALTER TABLE dhcp6_options