diff options
author | Marcin Siodelski <marcin@isc.org> | 2019-08-20 13:53:18 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2019-08-20 13:56:08 +0200 |
commit | 946faa16a5e23de0f26abba83df088f9cd3b4b3c (patch) | |
tree | e7571425553e00dfcc40d196a87197bfbcec12d9 /src/share | |
parent | [#845] Fixes in kea-admin/mysql.upgrade unit-test (diff) | |
download | kea-946faa16a5e23de0f26abba83df088f9cd3b4b3c.tar.xz kea-946faa16a5e23de0f26abba83df088f9cd3b4b3c.zip |
[#845] Addressed review comments.
Added better commentary in the dhcpdb_create.mysql script and the 8.2
upgrade script.
Diffstat (limited to 'src/share')
-rw-r--r-- | src/share/database/scripts/mysql/dhcpdb_create.mysql | 36 | ||||
-rw-r--r-- | src/share/database/scripts/mysql/upgrade_8.1_to_8.2.sh.in | 36 |
2 files changed, 56 insertions, 16 deletions
diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index fd62795e0e..ae4f886975 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -1740,7 +1740,8 @@ DELIMITER ; -- The following parameters are passed to the procedure: -- - modification_type: "create", "update" or "delete" -- - scope_id: identifier of the option scope, e.g. --- global, subnet specific etc. +-- global, subnet specific etc. See dhcp_option_scope +-- for specific values. -- - option_id: identifier of the option. -- - subnet_id: identifier of the subnet if the option -- belongs to the subnet. @@ -2578,10 +2579,13 @@ BEGIN END $$ DELIMITER ; -# Recreate dhcp4_options_AINS trigger to use pass timestamp to the updated +# Recreate dhcp4_options_AINS trigger to pass timestamp to the updated # version of the createOptionAuditDHCP4. DROP TRIGGER IF EXISTS dhcp4_options_AINS; +# This trigger is executed after inserting a DHCPv4 option into the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp4_options_AINS AFTER INSERT ON dhcp4_options FOR EACH ROW @@ -2592,10 +2596,13 @@ CREATE TRIGGER dhcp4_options_AINS AFTER INSERT ON dhcp4_options END $$ DELIMITER ; -# Recreate dhcp4_options_AUPD trigger to use pass timestamp to the updated +# Recreate dhcp4_options_AUPD trigger to pass timestamp to the updated # version of the createOptionAuditDHCP4. DROP TRIGGER IF EXISTS dhcp4_options_AUPD; +# This trigger is executed after updating a DHCPv4 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp4_options_AUPD AFTER UPDATE ON dhcp4_options FOR EACH ROW @@ -2606,10 +2613,13 @@ CREATE TRIGGER dhcp4_options_AUPD AFTER UPDATE ON dhcp4_options END $$ DELIMITER ; -# Recreate dhcp4_options_ADEL trigger to use pass timestamp to the updated +# Recreate dhcp4_options_ADEL trigger to pass timestamp to the updated # version of the createOptionAuditDHCP4. DROP TRIGGER IF EXISTS dhcp4_options_ADEL; +# This trigger is executed after deleting a DHCPv4 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp4_options_ADEL AFTER DELETE ON dhcp4_options FOR EACH ROW @@ -2630,7 +2640,8 @@ DELIMITER ; -- The following parameters are passed to the procedure: -- - modification_type: "create", "update" or "delete" -- - scope_id: identifier of the option scope, e.g. --- global, subnet specific etc. +-- global, subnet specific etc. See dhcp_option_scope +-- for specific values. -- - option_id: identifier of the option. -- - subnet_id: identifier of the subnet if the option -- belongs to the subnet. @@ -2714,10 +2725,13 @@ BEGIN END $$ DELIMITER ; -# Recreate dhcp6_options_AINS trigger to use pass timestamp to the updated +# Recreate dhcp6_options_AINS trigger to pass timestamp to the updated # version of the createOptionAuditDHCP6. DROP TRIGGER IF EXISTS dhcp6_options_AINS; +# This trigger is executed after inserting a DHCPv6 option into the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp6_options_AINS AFTER INSERT ON dhcp6_options FOR EACH ROW @@ -2728,10 +2742,13 @@ CREATE TRIGGER dhcp6_options_AINS AFTER INSERT ON dhcp6_options END $$ DELIMITER ; -# Recreate dhcp6_options_AUPD trigger to use pass timestamp to the updated +# Recreate dhcp6_options_AUPD trigger to pass timestamp to the updated # version of the createOptionAuditDHCP6. DROP TRIGGER IF EXISTS dhcp6_options_AUPD; +# This trigger is executed after updating a DHCPv6 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp6_options_AUPD AFTER UPDATE ON dhcp6_options FOR EACH ROW @@ -2742,10 +2759,13 @@ CREATE TRIGGER dhcp6_options_AUPD AFTER UPDATE ON dhcp6_options END $$ DELIMITER ; -# Recreate dhcp6_options_ADEL trigger to use pass timestamp to the updated +# Recreate dhcp6_options_ADEL trigger to pass timestamp to the updated # version of the createOptionAuditDHCP6. DROP TRIGGER IF EXISTS dhcp6_options_ADEL; +# This trigger is executed after deleting a DHCPv6 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp6_options_ADEL AFTER DELETE ON dhcp6_options FOR EACH ROW diff --git a/src/share/database/scripts/mysql/upgrade_8.1_to_8.2.sh.in b/src/share/database/scripts/mysql/upgrade_8.1_to_8.2.sh.in index c0d6718a3a..53e072c8ff 100644 --- a/src/share/database/scripts/mysql/upgrade_8.1_to_8.2.sh.in +++ b/src/share/database/scripts/mysql/upgrade_8.1_to_8.2.sh.in @@ -144,7 +144,8 @@ ALTER TABLE dhcp6_pool -- The following parameters are passed to the procedure: -- - modification_type: "create", "update" or "delete" -- - scope_id: identifier of the option scope, e.g. --- global, subnet specific etc. +-- global, subnet specific etc. See dhcp_option_scope +-- for specific values. -- - option_id: identifier of the option. -- - subnet_id: identifier of the subnet if the option -- belongs to the subnet. @@ -219,10 +220,13 @@ BEGIN END $$ DELIMITER ; -# Recreate dhcp4_options_AINS trigger to use pass timestamp to the updated +# Recreate dhcp4_options_AINS trigger to pass timestamp to the updated # version of the createOptionAuditDHCP4. DROP TRIGGER IF EXISTS dhcp4_options_AINS; +# This trigger is executed after inserting a DHCPv4 option into the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp4_options_AINS AFTER INSERT ON dhcp4_options FOR EACH ROW @@ -233,10 +237,13 @@ CREATE TRIGGER dhcp4_options_AINS AFTER INSERT ON dhcp4_options END $$ DELIMITER ; -# Recreate dhcp4_options_AUPD trigger to use pass timestamp to the updated +# Recreate dhcp4_options_AUPD trigger to pass timestamp to the updated # version of the createOptionAuditDHCP4. DROP TRIGGER IF EXISTS dhcp4_options_AUPD; +# This trigger is executed after updating a DHCPv4 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp4_options_AUPD AFTER UPDATE ON dhcp4_options FOR EACH ROW @@ -247,10 +254,13 @@ CREATE TRIGGER dhcp4_options_AUPD AFTER UPDATE ON dhcp4_options END $$ DELIMITER ; -# Recreate dhcp4_options_ADEL trigger to use pass timestamp to the updated +# Recreate dhcp4_options_ADEL trigger to pass timestamp to the updated # version of the createOptionAuditDHCP4. DROP TRIGGER IF EXISTS dhcp4_options_ADEL; +# This trigger is executed after deleting a DHCPv4 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp4_options_ADEL AFTER DELETE ON dhcp4_options FOR EACH ROW @@ -271,7 +281,8 @@ DELIMITER ; -- The following parameters are passed to the procedure: -- - modification_type: "create", "update" or "delete" -- - scope_id: identifier of the option scope, e.g. --- global, subnet specific etc. +-- global, subnet specific etc. See dhcp_option_scope +-- for specific values. -- - option_id: identifier of the option. -- - subnet_id: identifier of the subnet if the option -- belongs to the subnet. @@ -355,10 +366,13 @@ BEGIN END $$ DELIMITER ; -# Recreate dhcp6_options_AINS trigger to use pass timestamp to the updated +# Recreate dhcp6_options_AINS trigger to pass timestamp to the updated # version of the createOptionAuditDHCP6. DROP TRIGGER IF EXISTS dhcp6_options_AINS; +# This trigger is executed after inserting a DHCPv6 option into the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp6_options_AINS AFTER INSERT ON dhcp6_options FOR EACH ROW @@ -369,10 +383,13 @@ CREATE TRIGGER dhcp6_options_AINS AFTER INSERT ON dhcp6_options END $$ DELIMITER ; -# Recreate dhcp6_options_AUPD trigger to use pass timestamp to the updated +# Recreate dhcp6_options_AUPD trigger to pass timestamp to the updated # version of the createOptionAuditDHCP6. DROP TRIGGER IF EXISTS dhcp6_options_AUPD; +# This trigger is executed after updating a DHCPv6 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp6_options_AUPD AFTER UPDATE ON dhcp6_options FOR EACH ROW @@ -383,10 +400,13 @@ CREATE TRIGGER dhcp6_options_AUPD AFTER UPDATE ON dhcp6_options END $$ DELIMITER ; -# Recreate dhcp6_options_ADEL trigger to use pass timestamp to the updated +# Recreate dhcp6_options_ADEL trigger to pass timestamp to the updated # version of the createOptionAuditDHCP6. DROP TRIGGER IF EXISTS dhcp6_options_ADEL; +# This trigger is executed after deleting a DHCPv6 option in the +# database. It creates appropriate audit entry for this option or +# a parent object owning this option. DELIMITER $$ CREATE TRIGGER dhcp6_options_ADEL AFTER DELETE ON dhcp6_options FOR EACH ROW |