From 4aa1307c9fa237f9ced51a0e314abb34ed173a75 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Tue, 28 Jul 2015 11:59:46 +0200 Subject: [PATCH] mysql-schema: create settings tablef for datafield --- schema/mysql-changes/upgrade_33.sql | 11 +++++++++++ schema/mysql.sql | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 schema/mysql-changes/upgrade_33.sql diff --git a/schema/mysql-changes/upgrade_33.sql b/schema/mysql-changes/upgrade_33.sql new file mode 100644 index 00000000..19f7e45a --- /dev/null +++ b/schema/mysql-changes/upgrade_33.sql @@ -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; diff --git a/schema/mysql.sql b/schema/mysql.sql index f125878a..390b2194 100644 --- a/schema/mysql.sql +++ b/schema/mysql.sql @@ -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,