schema/postgres: fix wrong uniqueness

fixes #1762
This commit is contained in:
Thomas Gelf 2019-02-14 15:20:49 +01:00
parent b52316a8b5
commit f06b5df3ae
3 changed files with 12 additions and 3 deletions

View File

@ -20,6 +20,10 @@ before switching to a new version.
* FIX: Loop detection works again (#1631)
* FEATURE: RO users could want to see where a configured service originated (#1785)
### DB Schema
* FIX: it wasn't possible to use the same custom var in multiple notification
definitions on PostgreSQL (#1762)
### Icinga Configuration
* FIX: escape newly introduced Icinga 2 keywords (#1765)

View File

@ -0,0 +1,6 @@
DROP INDEX IF EXISTS notification_var_search_idx;
CREATE INDEX notification_var_search_idx ON icinga_notification_var (varname);
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (158, NOW());

View File

@ -1748,10 +1748,9 @@ CREATE TABLE icinga_notification_var (
);
CREATE INDEX notification_var_command ON icinga_notification_var (notification_id);
CREATE UNIQUE INDEX notification_var_search_idx ON icinga_notification_var (varname);
CREATE INDEX notification_var_search_idx ON icinga_notification_var (varname);
CREATE INDEX notification_var_checksum ON icinga_notification_var (checksum);
CREATE TABLE icinga_notification_field (
notification_id integer NOT NULL,
datafield_id integer NOT NULL,
@ -2087,4 +2086,4 @@ CREATE TABLE icinga_timeperiod_exclude (
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (157, NOW());
VALUES (158, NOW());