X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=doc%2Fdb-backend.txt;h=10774509d8b95fcca5009015ada1cb15b2d4ac26;hb=707ad8a0985554d05fb4f51b9d46f9debf1e00aa;hp=3712c3765889afcf8a1b0f11f43a7b06366d4c2b;hpb=3499f99feb029991182c20537d7e8f8fc83c3a5d;p=squirrelmail.git diff --git a/doc/db-backend.txt b/doc/db-backend.txt index 3712c376..10774509 100644 --- a/doc/db-backend.txt +++ b/doc/db-backend.txt @@ -55,12 +55,26 @@ The table structure should be similar to this (for MySQL): KEY firstname (firstname,lastname) ); +and similar to this for PostgreSQL: +CREATE TABLE "address" ( + "owner" varchar(128) NOT NULL, + "nickname" varchar(16) NOT NULL, + "firstname" varchar(128) NOT NULL, + "lastname" varchar(128) NOT NULL, + "email" varchar(128) NOT NULL, + "label" varchar(255) NOT NULL, + CONSTRAINT "address_pkey" PRIMARY KEY ("nickname", "owner") +); +CREATE UNIQUE INDEX "address_firstname_key" ON "address" + ("firstname", "lastname"); + Next, edit your configuration so that the address book DSN (Data Source Name) is specified, this can be done using either conf.pl or via the administration plugin. The DSN should look something like: - mysql://squirreluser:sqpassword@localhost/squirrelmail + mysql://squirreluser:sqpassword@localhost/squirrelmail or + pgsql://squirreluser:sqpassword@localhost/squirrelmail From now on all users' personal addressbooks will be stored in a database. @@ -82,15 +96,23 @@ The table structure should be similar to this (for MySQL): PRIMARY KEY (user,prefkey) ); +and for PostgreSQL: +CREATE TABLE "userprefs" ( + "username" varchar(128) NOT NULL, + "prefkey" varchar(64) NOT NULL, + "prefval" text, + CONSTRAINT "userprefs_pkey" PRIMARY KEY ("prefkey", "username") +); + Next, edit your configuration so that the preferences DSN (Data Source Name) is specified, this can be done using either conf.pl or via the administration plugin. The DSN should look something like: - mysql://squirreluser:sqpassword@localhost/squirrelmail + mysql://squirreluser:sqpassword@localhost/squirrelmail or + pgsql://squirreluser:sqpassword@localhost/squirrelmail From now on all users' personal preferences will be stored in a database. Default preferences can be set by altering the $default array in db_prefs.php. -