Add new `section` column to icingaweb_user_preference table for pgsql

This commit is contained in:
Alexander Fuhr 2014-11-18 11:02:19 +01:00
parent 9a79cd58e9
commit 26c0fe7637
1 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,7 @@ CREATE UNIQUE INDEX idx_icingaweb_user
CREATE TABLE "icingaweb_user_preference" ( CREATE TABLE "icingaweb_user_preference" (
"username" character varying(64) NOT NULL, "username" character varying(64) NOT NULL,
"name" character varying(64) NOT NULL, "name" character varying(64) NOT NULL,
"section" character varying(64) NOT NULL,
"value" character varying(255) NOT NULL, "value" character varying(255) NOT NULL,
"ctime" timestamp NULL DEFAULT NULL, "ctime" timestamp NULL DEFAULT NULL,
"mtime" timestamp NULL DEFAULT NULL "mtime" timestamp NULL DEFAULT NULL
@ -85,6 +86,7 @@ ALTER TABLE ONLY "icingaweb_user_preference"
ADD CONSTRAINT pk_icingaweb_user_preference ADD CONSTRAINT pk_icingaweb_user_preference
PRIMARY KEY ( PRIMARY KEY (
"username", "username",
"section",
"name" "name"
); );
@ -92,5 +94,6 @@ CREATE UNIQUE INDEX idx_icingaweb_user_preference
ON "icingaweb_user_preference" ON "icingaweb_user_preference"
USING btree ( USING btree (
lower((username)::text), lower((username)::text),
lower((section)::text),
lower((name)::text) lower((name)::text)
); );