mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#90] Added dhcp4_options_server, hopefully the last table missing
This commit is contained in:
@@ -586,6 +586,23 @@ CREATE TRIGGER dhcp4_options_modification_ts_update
|
||||
|
||||
|
||||
|
||||
-- Now create a table for associating defined v4 options with servers.
|
||||
CREATE TABLE dhcp4_options_server (
|
||||
option_id BIGINT NOT NULL,
|
||||
server_id BIGINT NOT NULL,
|
||||
modification_ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (option_id, server_id),
|
||||
CONSTRAINT fk_dhcp4_options_server_option_id FOREIGN KEY (option_id) REFERENCES dhcp4_options (option_id) ON DELETE CASCADE ON UPDATE NO ACTION,
|
||||
CONSTRAINT fk_dhcp4_options_server_server_id FOREIGN KEY (server_id) REFERENCES dhcp4_server (id) ON DELETE CASCADE ON UPDATE NO ACTION
|
||||
);
|
||||
CREATE INDEX dhcp4_options_server_idx1 on dhcp4_options_server(server_id);
|
||||
CREATE INDEX dhcp4_options_server_idx2 on dhcp4_options_server(modification_ts);
|
||||
CREATE TRIGGER dhcp4_options_server_modification_ts_update
|
||||
AFTER UPDATE ON dhcp4_options_server
|
||||
FOR EACH ROW EXECUTE PROCEDURE modification_ts_update();
|
||||
|
||||
|
||||
|
||||
-- This table is for storing IPv4 option definitions
|
||||
CREATE TABLE dhcp4_option_def (
|
||||
id SERIAL PRIMARY KEY UNIQUE NOT NULL,
|
||||
|
Reference in New Issue
Block a user