2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#1405] updated upgrade script

This commit is contained in:
Razvan Becheriu
2020-10-13 14:30:30 +03:00
parent 27e2a4350e
commit f90a40f037

View File

@@ -19,17 +19,17 @@ fi
mysql "$@" <<EOF
# 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;