From 853b6ceb846a86d3fbd52d04fe9f8d1e4882744a Mon Sep 17 00:00:00 2001 From: raviks789 Date: Mon, 22 Jul 2024 15:43:49 +0200 Subject: [PATCH] Make unique constraints consistent across databases --- schema/pgsql-migrations/upgrade_188.sql | 6 ++++++ schema/pgsql.sql | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 schema/pgsql-migrations/upgrade_188.sql diff --git a/schema/pgsql-migrations/upgrade_188.sql b/schema/pgsql-migrations/upgrade_188.sql new file mode 100644 index 000000000..ca0b3d810 --- /dev/null +++ b/schema/pgsql-migrations/upgrade_188.sql @@ -0,0 +1,6 @@ +DROP INDEX IF EXISTS import_row_modifier_prio; +DROP INDEX IF EXISTS service_branch_object_name; + +INSERT INTO director_schema_migration + (schema_version, migration_time) + VALUES (188, NOW()); diff --git a/schema/pgsql.sql b/schema/pgsql.sql index 32931e6d7..694d8c90d 100644 --- a/schema/pgsql.sql +++ b/schema/pgsql.sql @@ -1619,9 +1619,6 @@ CREATE TABLE import_row_modifier ( ); CREATE INDEX import_row_modifier_search_idx ON import_row_modifier (property_name); -CREATE UNIQUE INDEX import_row_modifier_prio - ON import_row_modifier (source_id, priority); - CREATE TABLE import_row_modifier_setting ( row_modifier_id serial, @@ -2637,7 +2634,6 @@ CREATE TABLE branched_icinga_service ( ON UPDATE CASCADE ); -CREATE UNIQUE INDEX service_branch_object_name ON branched_icinga_service (branch_uuid, object_name); CREATE INDEX branched_service_search_object_name ON branched_icinga_service (object_name); CREATE INDEX branched_service_search_display_name ON branched_icinga_service (display_name);