mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
[#1405] updated schema scripts
This commit is contained in:
@@ -3028,17 +3028,6 @@ SET version = '9', minor = '4';
|
||||
# This line concludes database upgrade to version 9.4.
|
||||
|
||||
# Update reservation_mode value after separating flags.
|
||||
CREATE TABLE reservation_mode_type (
|
||||
reservation_mode TINYINT PRIMARY KEY NOT NULL, # Reservation mode code.
|
||||
name VARCHAR(32) # Reservation mode name.
|
||||
) ENGINE = INNODB;
|
||||
|
||||
START TRANSACTION;
|
||||
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, 'all'); # in-subnet
|
||||
INSERT INTO reservation_mode_type VALUES (4, 'global'); # global
|
||||
COMMIT;
|
||||
|
||||
# update old global to new value
|
||||
UPDATE dhcp4_subnet SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
@@ -3048,6 +3037,10 @@ UPDATE dhcp4_shared_network SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
UPDATE dhcp4_subnet SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
UPDATE dhcp4_shared_network SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
|
||||
# update out-of-pool all to new value
|
||||
UPDATE dhcp4_subnet SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
UPDATE dhcp4_shared_network SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
|
||||
# update old global to new value
|
||||
UPDATE dhcp6_subnet SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
UPDATE dhcp6_shared_network SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
@@ -3056,6 +3049,10 @@ UPDATE dhcp6_shared_network SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
UPDATE dhcp6_subnet SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
UPDATE dhcp6_shared_network SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
|
||||
# update out-of-pool all to new value
|
||||
UPDATE dhcp6_subnet SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
UPDATE dhcp6_shared_network SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
|
||||
# Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '9', minor = '5';
|
||||
|
@@ -19,17 +19,6 @@ fi
|
||||
mysql "$@" <<EOF
|
||||
|
||||
# Update reservation_mode value after separating flags.
|
||||
CREATE TABLE reservation_mode_type (
|
||||
reservation_mode TINYINT PRIMARY KEY NOT NULL, # Reservation mode code.
|
||||
name VARCHAR(32) # Reservation mode name.
|
||||
) ENGINE = INNODB;
|
||||
|
||||
START TRANSACTION;
|
||||
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, 'all'); # in-subnet
|
||||
INSERT INTO reservation_mode_type VALUES (4, 'global'); # global
|
||||
COMMIT;
|
||||
|
||||
# update old global to new value
|
||||
UPDATE dhcp4_subnet SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
@@ -39,6 +28,10 @@ UPDATE dhcp4_shared_network SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
UPDATE dhcp4_subnet SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
UPDATE dhcp4_shared_network SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
|
||||
# update out-of-pool all to new value
|
||||
UPDATE dhcp4_subnet SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
UPDATE dhcp4_shared_network SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
|
||||
# update old global to new value
|
||||
UPDATE dhcp6_subnet SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
UPDATE dhcp6_shared_network SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
@@ -47,6 +40,10 @@ UPDATE dhcp6_shared_network SET reservation_mode = 4 WHERE reservation_mode = 2;
|
||||
UPDATE dhcp6_subnet SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
UPDATE dhcp6_shared_network SET reservation_mode = 2 WHERE reservation_mode = 3;
|
||||
|
||||
# update out-of-pool all to new value
|
||||
UPDATE dhcp6_subnet SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
UPDATE dhcp6_shared_network SET reservation_mode = 3 WHERE reservation_mode = 1;
|
||||
|
||||
# Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '9', minor = '5';
|
||||
|
Reference in New Issue
Block a user