liquid_feedback_core

view update/core-update.v3.0.3-v3.0.4.sql @ 440:9055fd4de232

Added data structures to support externally managed accounts (e.g. LDAP)
author jbe
date Tue Jul 22 18:46:25 2014 +0200 (2014-07-22)
parents
children f5c78b0590c6
line source
1 BEGIN;
3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
4 SELECT * FROM (VALUES ('3.0.4', 3, 0, 4))
5 AS "subquery"("string", "major", "minor", "revision");
7 ALTER TABLE "member" ADD COLUMN "authority" TEXT;
8 ALTER TABLE "member" ADD COLUMN "authority_uid" TEXT;
9 ALTER TABLE "member" ADD COLUMN "authority_login" TEXT;
11 COMMENT ON COLUMN "member"."authority" IS 'NULL if LiquidFeedback Core is authoritative for the member account; otherwise a string that indicates the source/authority of the external account (e.g. ''LDAP'' for an LDAP account)';
12 COMMENT ON COLUMN "member"."authority_uid" IS 'Unique identifier (unique per "authority") that allows to identify an external account (e.g. even if the login name changes)';
13 COMMENT ON COLUMN "member"."authority_login" IS 'Login name for external accounts (field is not unique!)';
15 ALTER TABLE "member" ADD CONSTRAINT "authority_requires_uid_and_vice_versa"
16 CHECK ("authority" NOTNULL = "authority_uid" NOTNULL);
18 ALTER TABLE "member" ADD CONSTRAINT "authority_uid_unique_per_authority"
19 UNIQUE ("authority", "authority_uid");
21 ALTER TABLE "member" ADD CONSTRAINT "authority_login_requires_authority"
22 CHECK ("authority" NOTNULL OR "authority_login" ISNULL);
24 CREATE INDEX "member_authority_login_idx" ON "member" ("authority_login");
26 ALTER TABLE "session" ADD COLUMN "authority" TEXT;
27 ALTER TABLE "session" ADD COLUMN "authority_uid" TEXT;
28 ALTER TABLE "session" ADD COLUMN "authority_login" TEXT;
30 COMMENT ON COLUMN "session"."authority" IS 'Temporary store for "member"."authority" during member account creation';
31 COMMENT ON COLUMN "session"."authority_uid" IS 'Temporary store for "member"."authority_uid" during member account creation';
32 COMMENT ON COLUMN "session"."authority_login" IS 'Temporary store for "member"."authority_login" during member account creation';
34 COMMIT;

Impressum / About Us