schema: unique constraint on command argument
This commit is contained in:
parent
01078199a6
commit
c118b24056
|
@ -0,0 +1 @@
|
|||
ALTER TABLE icinga_command_argument ADD UNIQUE KEY unique_idx (command_id, argument_name);
|
|
@ -195,6 +195,7 @@ CREATE TABLE icinga_command_argument (
|
|||
set_if_format ENUM('string', 'expression', 'json') DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE INDEX sort_idx (command_id, sort_order),
|
||||
UNIQUE KEY unique_idx (command_id, argument_name),
|
||||
CONSTRAINT icinga_command_argument_command
|
||||
FOREIGN KEY command (command_id)
|
||||
REFERENCES icinga_command (id)
|
||||
|
|
Loading…
Reference in New Issue