From 739d8b55dac9da9a3bec41c04b0a34e62f768d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Malo=C5=A1t=C3=ADk?= <malostik@cesnet.cz> Date: Mon, 12 Sep 2022 15:08:39 +0200 Subject: [PATCH] Allow negative category and tag IDs --- warden_server/warden_3.0_postgres.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/warden_server/warden_3.0_postgres.sql b/warden_server/warden_3.0_postgres.sql index 7ccb1dc..208acc6 100644 --- a/warden_server/warden_3.0_postgres.sql +++ b/warden_server/warden_3.0_postgres.sql @@ -19,7 +19,7 @@ CREATE COLLATION IF NOT EXISTS case_insensitive ( -- CREATE TABLE IF NOT EXISTS "categories" ( - "id" int NOT NULL UNIQUE CHECK ("id" >= 0), + "id" int NOT NULL UNIQUE, "category" text NOT NULL COLLATE case_insensitive, "subcategory" text DEFAULT NULL COLLATE case_insensitive, "cat_subcat" text NOT NULL COLLATE case_insensitive @@ -103,7 +103,7 @@ CREATE INDEX IF NOT EXISTS "client_id" ON "last_events" ("client_id", "event_id" -- CREATE TABLE IF NOT EXISTS "tags" ( - "id" int NOT NULL UNIQUE CHECK ("id" >= 0), + "id" int NOT NULL UNIQUE, "tag" text NOT NULL COLLATE case_insensitive ); -- GitLab