schema: allow for required arguments
This commit is contained in:
parent
a6be710379
commit
c7578bd7ef
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE icinga_command_argument
|
||||
ADD required ENUM('y', 'n') DEFAULT NULL AFTER repeat_key;
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
SET migration_time = NOW(),
|
||||
schema_version = 89;
|
|
@ -289,6 +289,7 @@ CREATE TABLE icinga_command_argument (
|
|||
set_if_format ENUM('string', 'expression', 'json') DEFAULT NULL,
|
||||
sort_order SMALLINT DEFAULT NULL, -- -> order
|
||||
repeat_key ENUM('y', 'n') DEFAULT NULL COMMENT 'Useful with array values',
|
||||
required ENUM('y', 'n') DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY unique_idx (command_id, argument_name),
|
||||
INDEX sort_idx (command_id, sort_order),
|
||||
|
@ -1257,4 +1258,4 @@ CREATE TABLE sync_run (
|
|||
|
||||
INSERT INTO director_schema_migration
|
||||
SET migration_time = NOW(),
|
||||
schema_version = 87;
|
||||
schema_version = 89;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE icinga_command_argument ADD required enum_boolean DEFAULT NULL;
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (89, NOW());
|
|
@ -376,6 +376,7 @@ CREATE TABLE icinga_command_argument (
|
|||
set_if_format enum_property_format DEFAULT NULL,
|
||||
sort_order smallint DEFAULT NULL, -- -> order
|
||||
repeat_key enum_boolean DEFAULT NULL,
|
||||
required enum_boolean DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT icinga_command_argument_command
|
||||
FOREIGN KEY (command_id)
|
||||
|
@ -1470,4 +1471,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance
|
|||
-- set current schema version
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (88, NOW());
|
||||
VALUES (89, NOW());
|
||||
|
|
Loading…
Reference in New Issue