From: Marcin Siodelski Date: Thu, 13 Sep 2018 10:10:32 +0000 (+0200) Subject: [#89,!22] Auto increment option id. X-Git-Tag: 134-bugs--xcode-10_base~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cffada5e956c7b17296a32b255819117cd410fe;p=thirdparty%2Fkea.git [#89,!22] Auto increment option id. --- 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