mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-05-28 04:35:53 -04:00
schema: unique constraint on command argument
This commit is contained in:
parent
01078199a6
commit
c118b24056
2 changed files with 2 additions and 0 deletions
1
schema/mysql-changes/upgrade_2.sql
Normal file
1
schema/mysql-changes/upgrade_2.sql
Normal file
|
|
@ -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 a new issue