Skip to content
Snippets Groups Projects
Commit 21c1da3a authored by Jakub Maloštík's avatar Jakub Maloštík
Browse files

Ditch case_insensitive collation

parent 739d8b55
No related branches found
No related tags found
No related merge requests found
SET TimeZone='+00:00'; SET TimeZone='+00:00';
CREATE COLLATION IF NOT EXISTS case_insensitive (
provider = icu,
locale = 'und-u-ks-level2',
deterministic = false
);
-- --------------------------------------------------------- -- ---------------------------------------------------------
-- --
...@@ -20,9 +14,9 @@ CREATE COLLATION IF NOT EXISTS case_insensitive ( ...@@ -20,9 +14,9 @@ CREATE COLLATION IF NOT EXISTS case_insensitive (
CREATE TABLE IF NOT EXISTS "categories" ( CREATE TABLE IF NOT EXISTS "categories" (
"id" int NOT NULL UNIQUE, "id" int NOT NULL UNIQUE,
"category" text NOT NULL COLLATE case_insensitive, "category" text NOT NULL,
"subcategory" text DEFAULT NULL COLLATE case_insensitive, "subcategory" text DEFAULT NULL,
"cat_subcat" text NOT NULL COLLATE case_insensitive "cat_subcat" text NOT NULL
); );
CREATE INDEX IF NOT EXISTS "cat_sub" ON "categories" ("cat_subcat"); CREATE INDEX IF NOT EXISTS "cat_sub" ON "categories" ("cat_subcat");
...@@ -36,9 +30,9 @@ CREATE INDEX IF NOT EXISTS "cat_sub" ON "categories" ("cat_subcat"); ...@@ -36,9 +30,9 @@ CREATE INDEX IF NOT EXISTS "cat_sub" ON "categories" ("cat_subcat");
CREATE TABLE IF NOT EXISTS "clients" ( CREATE TABLE IF NOT EXISTS "clients" (
"id" SERIAL PRIMARY KEY, "id" SERIAL PRIMARY KEY,
"registered" timestamp NOT NULL DEFAULT '1970-01-01 00:00:00', "registered" timestamp NOT NULL DEFAULT '1970-01-01 00:00:00',
"requestor" text NOT NULL COLLATE case_insensitive, "requestor" text NOT NULL,
"hostname" text NOT NULL COLLATE case_insensitive, "hostname" text NOT NULL,
"note" text NULL COLLATE case_insensitive, "note" text NULL,
"valid" smallint NOT NULL DEFAULT '1' CHECK ("valid" >= 0), "valid" smallint NOT NULL DEFAULT '1' CHECK ("valid" >= 0),
"name" text NOT NULL, "name" text NOT NULL,
"secret" text NULL, "secret" text NULL,
...@@ -104,7 +98,7 @@ CREATE INDEX IF NOT EXISTS "client_id" ON "last_events" ("client_id", "event_id" ...@@ -104,7 +98,7 @@ CREATE INDEX IF NOT EXISTS "client_id" ON "last_events" ("client_id", "event_id"
CREATE TABLE IF NOT EXISTS "tags" ( CREATE TABLE IF NOT EXISTS "tags" (
"id" int NOT NULL UNIQUE, "id" int NOT NULL UNIQUE,
"tag" text NOT NULL COLLATE case_insensitive "tag" text NOT NULL
); );
CREATE INDEX IF NOT EXISTS "id_tag_name" ON "tags" ("id", "tag"); CREATE INDEX IF NOT EXISTS "id_tag_name" ON "tags" ("id", "tag");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment