Skip to content

Commit 1cffada

Browse files
committed
[#89,!22] Auto increment option id.
1 parent 4c4a676 commit 1cffada

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/share/database/scripts/mysql/dhcpdb_create.mysql

+2-2
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_subnet_server (
999999

10001000

10011001
# Modify the primary key to BINGINT as other tables have.
1002-
ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL;
1002+
ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;
10031003

10041004
# Add conifguration backend specific columns.
10051005
ALTER TABLE dhcp4_options
@@ -1251,7 +1251,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_pool (
12511251
) ENGINE=InnoDB;
12521252

12531253
# Modify the primary key to BINGINT as other tables have.
1254-
ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL;
1254+
ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;
12551255

12561256
# Add conifguration backend specific columns.
12571257
ALTER TABLE dhcp6_options

src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_subnet_server (
327327
328328
# Modify the primary key to BINGINT as other tables have.
329329
#
330-
ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL;
330+
ALTER TABLE dhcp4_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;
331331
332332
# Add conifguration backend specific columns.
333333
ALTER TABLE dhcp4_options
@@ -562,7 +562,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_pool (
562562
) ENGINE=InnoDB;
563563
564564
# Modify the primary key to BINGINT as other tables have.
565-
ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL;
565+
ALTER TABLE dhcp6_options MODIFY option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;
566566
567567
# Add conifguration backend specific columns.
568568
ALTER TABLE dhcp6_options

0 commit comments

Comments
 (0)