summaryrefslogtreecommitdiffstats
path: root/src/share
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2020-10-13 13:26:33 +0200
committerRazvan Becheriu <razvan@isc.org>2020-11-18 14:55:22 +0100
commit27e2a4350e502a681bf26cde73d5a896412c6ff4 (patch)
tree6b00e198fc9721cde53e66906c5a112c56288237 /src/share
parent[#1405] minor changes (diff)
downloadkea-27e2a4350e502a681bf26cde73d5a896412c6ff4.tar.xz
kea-27e2a4350e502a681bf26cde73d5a896412c6ff4.zip
[#1405] fixed create and drop schema tables
Diffstat (limited to 'src/share')
-rw-r--r--src/share/database/scripts/mysql/dhcpdb_create.mysql14
-rw-r--r--src/share/database/scripts/mysql/dhcpdb_drop.mysql1
2 files changed, 8 insertions, 7 deletions
diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql
index cd1894319d..4871ba07e4 100644
--- a/src/share/database/scripts/mysql/dhcpdb_create.mysql
+++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql
@@ -3028,17 +3028,17 @@ SET version = '9', minor = '4';
# This line concludes database upgrade to version 9.4.
# Update reservation_mode value after separating flags.
-CREATE TABLE reservation_modes (
+CREATE TABLE reservation_mode_type (
reservation_mode TINYINT PRIMARY KEY NOT NULL, # Reservation mode code.
- name VARCHAR(5) # Reservation mode name.
+ name VARCHAR(32) # Reservation mode name.
) ENGINE = INNODB;
START TRANSACTION;
-INSERT INTO reservation_mode VALUES (0, 'disabled'); # disabled
-INSERT INTO reservation_mode VALUES (1, 'out-of-pool'); # out-of-pool
-INSERT INTO reservation_mode VALUES (2, 'in-subnet'); # in-subnet
-INSERT INTO reservation_mode VALUES (3, 'all'); # all (in-subnet + out-of-pool)
-INSERT INTO reservation_mode VALUES (4, 'global'); # global
+INSERT INTO reservation_mode_type VALUES (0, 'disabled'); # disabled
+INSERT INTO reservation_mode_type VALUES (1, 'out-of-pool'); # out-of-pool
+INSERT INTO reservation_mode_type VALUES (2, 'in-subnet'); # in-subnet
+INSERT INTO reservation_mode_type VALUES (3, 'all'); # all (in-subnet + out-of-pool)
+INSERT INTO reservation_mode_type VALUES (4, 'global'); # global
COMMIT;
UPDATE dhcp4_subnet SET reservation_mode = 4 WHERE reservation_mode = 2;
diff --git a/src/share/database/scripts/mysql/dhcpdb_drop.mysql b/src/share/database/scripts/mysql/dhcpdb_drop.mysql
index 43a62e9d9d..0dde7fe65d 100644
--- a/src/share/database/scripts/mysql/dhcpdb_drop.mysql
+++ b/src/share/database/scripts/mysql/dhcpdb_drop.mysql
@@ -60,6 +60,7 @@ DROP TABLE IF EXISTS dhcp6_subnet;
DROP TABLE IF EXISTS dhcp6_subnet_server;
DROP TABLE IF EXISTS modification;
DROP TABLE IF EXISTS parameter_data_type;
+DROP TABLE IF EXISTS reservation_mode_type;
DROP PROCEDURE IF EXISTS createAuditRevisionDHCP4;
DROP PROCEDURE IF EXISTS createAuditEntryDHCP4;
DROP PROCEDURE IF EXISTS createOptionAuditDHCP4;