mysql-schema: create settings tablef for datafield

This commit is contained in:
Alexander Fuhr 2015-07-28 11:59:46 +02:00
parent 05a63e45d4
commit 4aa1307c9f
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,11 @@
CREATE TABLE director_datafield_setting (
datafield_id INT(10) UNSIGNED NOT NULL,
setting_name VARCHAR(64) NOT NULL,
setting_value TEXT NOT NULL,
PRIMARY KEY (datafield_id, setting_name),
CONSTRAINT datafield_id_settings
FOREIGN KEY datafield (datafield_id)
REFERENCES director_datafield (id)
ON DELETE CASCADE
ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -125,6 +125,18 @@ CREATE TABLE director_datafield (
KEY search_idx (varname)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE director_datafield_setting (
datafield_id INT(10) UNSIGNED NOT NULL,
setting_name VARCHAR(64) NOT NULL,
setting_value TEXT NOT NULL,
PRIMARY KEY (datafield_id, setting_name),
CONSTRAINT datafield_id_settings
FOREIGN KEY datafield (datafield_id)
REFERENCES director_datafield (id)
ON DELETE CASCADE
ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE icinga_zone (
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
parent_zone_id INT(10) UNSIGNED DEFAULT NULL,