icingaweb2/etc/schema/preferences.pgsql.sql
Matthias Jentsch 49cf62a9dc Fix database related bugs
Fix coding standards in database schemes. Use DbAdapterFactory in all unit
tests instead of creating own adapters. Fix DbUserBackend and DbStore to use
FETCH_OBJ, instead of FETCH_ASSOC, to handle it consistently in the whole
application. Remove unnecessary table columns from the "account" scheme.

refs #4577
refs #4578
refs #4596
refs #4599
refs #4627
2013-08-26 11:09:37 +02:00

10 lines
372 B
SQL

create table "preference"(
"username" VARCHAR(255) NOT NULL,
"key" VARCHAR(100) NOT NULL,
"value" VARCHAR(255) NOT NULL
);
ALTER TABLE ONLY "preference"
ADD CONSTRAINT preference_pkey PRIMARY KEY ("username", "key");
CREATE UNIQUE INDEX username_and_key_lower_unique_idx ON "preference" USING btree (lower((username)::text), lower((key)::text));