qry="select id, tag, description, modification_ts from dhcp4_server"
run_statement "dhcp4_server" "$qry"
+ # table: dhcp4_server - check if it contains default entries
+ qry="select count(*) from dhcp4_server"
+ run_statement "dhcp4_server" "$qry" 2
+
# table: dhcp4_audit
qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp4_audit"
run_statement "dhcp4_audit" "$qry"
qry="select id, tag, description, modification_ts from dhcp6_server"
run_statement "dhcp6_server" "$qry"
+ # table: dhcp6_server - check if it contains default entries
+ qry="select count(*) from dhcp6_server"
+ run_statement "dhcp6_server" "$qry" 2
+
# table: dhcp6_audit
qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp6_audit"
run_statement "dhcp6_audit" "$qry"
KEY key_dhcp4_server_modification_ts (modification_ts)
) ENGINE=InnoDB;
+# Special server entry meaning "unassigned server". This refers
+# to configuration entries that shouldn't be used by any of the
+# servers, e.g. when configuration entry is created but an
+# administrator doesn't want the servers to start using it yet.
+INSERT INTO dhcp4_server(id, tag, description, modification_ts)
+ VALUES(1, "unassigned", "special type: unassigned server", NOW());
+
+# Special server entry meaning "all servers". This refers to
+# the configuration entries owned by all servers.
+INSERT INTO dhcp4_server(id, tag, description, modification_ts)
+ VALUES(2, "all", "special type: all servers", NOW());
+
-- -----------------------------------------------------
-- Table `dhcp4_audit`
-- -----------------------------------------------------
KEY key_dhcp6_server_modification_ts (modification_ts)
) ENGINE=InnoDB;
+# Special server entry meaning "unassigned server". This refers
+# to configuration entries that shouldn't be used by any of the
+# servers, e.g. when configuration entry is created but an
+# administrator doesn't want the servers to start using it yet.
+INSERT INTO dhcp6_server(id, tag, description, modification_ts)
+ VALUES(1, "unassigned", "special type: unassigned server", NOW());
+
+# Special server entry meaning "all servers". This refers to
+# the configuration entries owned by all servers.
+INSERT INTO dhcp6_server(id, tag, description, modification_ts)
+ VALUES(2, "all", "special type: all servers", NOW());
+
-- -----------------------------------------------------
-- Table `dhcp6_audit`
-- -----------------------------------------------------
KEY key_dhcp4_server_modification_ts (modification_ts)
) ENGINE=InnoDB;
+# Special server entry meaning "unassigned server". This refers
+# to configuration entries that shouldn't be used by any of the
+# servers, e.g. when configuration entry is created but an
+# administrator doesn't want the servers to start using it yet.
+INSERT INTO dhcp4_server(id, tag, description, modification_ts)
+ VALUES(1, "unassigned", "special type: unassigned server", NOW());
+
+# Special server entry meaning "all servers". This refers to
+# the configuration entries owned by all servers.
+INSERT INTO dhcp4_server(id, tag, description, modification_ts)
+ VALUES(2, "all", "special type: all servers", NOW());
+
# Create table dhcp4_audit
#
CREATE TABLE IF NOT EXISTS dhcp4_audit (
KEY key_dhcp6_server_modification_ts (modification_ts)
) ENGINE=InnoDB;
+# Special server entry meaning "unassigned server". This refers
+# to configuration entries that shouldn't be used by any of the
+# servers, e.g. when configuration entry is created but an
+# administrator doesn't want the servers to start using it yet.
+INSERT INTO dhcp6_server(id, tag, description, modification_ts)
+ VALUES(1, "unassigned", "special type: unassigned server", NOW());
+
+# Special server entry meaning "all servers". This refers to
+# the configuration entries owned by all servers.
+INSERT INTO dhcp6_server(id, tag, description, modification_ts)
+ VALUES(2, "all", "special type: all servers", NOW());
+
# Create table dhcp6_audit
#
CREATE TABLE IF NOT EXISTS dhcp6_audit (