diff options
author | Thomas Markwalder <tmark@isc.org> | 2023-06-21 16:46:57 +0200 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2023-06-21 20:21:08 +0200 |
commit | 309df47c03212cb95c17f3d3c59d10f84fd17c13 (patch) | |
tree | 080ac6a36e5288ce18d3e7f7604ffe263786ace4 /src/share/database | |
parent | [#2909] More review fixes (diff) | |
download | kea-309df47c03212cb95c17f3d3c59d10f84fd17c13.tar.xz kea-309df47c03212cb95c17f3d3c59d10f84fd17c13.zip |
[#2909] Readd not null constraint
Diffstat (limited to 'src/share/database')
-rw-r--r-- | src/share/database/scripts/mysql/dhcpdb_create.mysql | 1 | ||||
-rw-r--r-- | src/share/database/scripts/mysql/upgrade_018_to_019.sh.in | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 53fdd0c28f..d05ccaede0 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -5707,6 +5707,7 @@ ALTER TABLE ipv6_reservations MODIFY COLUMN address VARCHAR(39) DEFAULT NULL; UPDATE ipv6_reservations set address = NULL; ALTER TABLE ipv6_reservations MODIFY COLUMN address BINARY(16); UPDATE ipv6_reservations set address = binaddr; +ALTER TABLE ipv6_reservations MODIFY COLUMN address BINARY(16) NOT NULL; ALTER TABLE ipv6_reservations DROP COLUMN binaddr; -- Convert binary lease6 address to text diff --git a/src/share/database/scripts/mysql/upgrade_018_to_019.sh.in b/src/share/database/scripts/mysql/upgrade_018_to_019.sh.in index 7f7557d767..c9f123676c 100644 --- a/src/share/database/scripts/mysql/upgrade_018_to_019.sh.in +++ b/src/share/database/scripts/mysql/upgrade_018_to_019.sh.in @@ -83,6 +83,7 @@ ALTER TABLE ipv6_reservations MODIFY COLUMN address VARCHAR(39) DEFAULT NULL; UPDATE ipv6_reservations set address = NULL; ALTER TABLE ipv6_reservations MODIFY COLUMN address BINARY(16); UPDATE ipv6_reservations set address = binaddr; +ALTER TABLE ipv6_reservations MODIFY COLUMN address BINARY(16) NOT NULL; ALTER TABLE ipv6_reservations DROP COLUMN binaddr; -- Convert binary lease6 address to text |