schema/mysql.sql: fix ordering
This commit is contained in:
parent
804245a35a
commit
44d9392e70
|
@ -140,38 +140,6 @@ CREATE TABLE director_datafield_setting (
|
|||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE director_job (
|
||||
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
|
||||
job_name VARCHAR(64) NOT NULL,
|
||||
job_class VARCHAR(72) NOT NULL,
|
||||
disabled ENUM('y', 'n') NOT NULL DEFAULT 'n',
|
||||
run_interval INT(10) UNSIGNED NOT NULL, -- seconds
|
||||
timeperiod_id INT(10) UNSIGNED DEFAULT NULL,
|
||||
last_attempt_succeeded ENUM('y', 'n') DEFAULT NULL,
|
||||
ts_last_attempt DATETIME DEFAULT NULL,
|
||||
ts_last_error DATETIME DEFAULT NULL,
|
||||
last_error_message TEXT,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY (job_name),
|
||||
CONSTRAINT director_job_period
|
||||
FOREIGN KEY timeperiod (timeperiod_id)
|
||||
REFERENCES icinga_timeperiod (id)
|
||||
ON DELETE RESTRICT
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE director_job_setting (
|
||||
job_id INT UNSIGNED NOT NULL,
|
||||
setting_name VARCHAR(64) NOT NULL,
|
||||
setting_value TEXT DEFAULT NULL,
|
||||
PRIMARY KEY (job_id, setting_name),
|
||||
CONSTRAINT job_settings
|
||||
FOREIGN KEY director_job (job_id)
|
||||
REFERENCES director_job (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE director_schema_migration (
|
||||
schema_version SMALLINT UNSIGNED NOT NULL,
|
||||
migration_time DATETIME NOT NULL,
|
||||
|
@ -269,6 +237,38 @@ CREATE TABLE icinga_timeperiod_range (
|
|||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE director_job (
|
||||
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
|
||||
job_name VARCHAR(64) NOT NULL,
|
||||
job_class VARCHAR(72) NOT NULL,
|
||||
disabled ENUM('y', 'n') NOT NULL DEFAULT 'n',
|
||||
run_interval INT(10) UNSIGNED NOT NULL, -- seconds
|
||||
timeperiod_id INT(10) UNSIGNED DEFAULT NULL,
|
||||
last_attempt_succeeded ENUM('y', 'n') DEFAULT NULL,
|
||||
ts_last_attempt DATETIME DEFAULT NULL,
|
||||
ts_last_error DATETIME DEFAULT NULL,
|
||||
last_error_message TEXT,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY (job_name),
|
||||
CONSTRAINT director_job_period
|
||||
FOREIGN KEY timeperiod (timeperiod_id)
|
||||
REFERENCES icinga_timeperiod (id)
|
||||
ON DELETE RESTRICT
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE director_job_setting (
|
||||
job_id INT UNSIGNED NOT NULL,
|
||||
setting_name VARCHAR(64) NOT NULL,
|
||||
setting_value TEXT DEFAULT NULL,
|
||||
PRIMARY KEY (job_id, setting_name),
|
||||
CONSTRAINT job_settings
|
||||
FOREIGN KEY director_job (job_id)
|
||||
REFERENCES director_job (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE icinga_command (
|
||||
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
|
||||
object_name VARCHAR(255) NOT NULL,
|
||||
|
|
Loading…
Reference in New Issue