diff options
author | Alexey Shchepin <alexey@process-one.net> | 2006-10-09 20:32:41 +0000 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2006-10-09 20:32:41 +0000 |
commit | 95e2726f712f87122c2cf30749727523ea072263 (patch) | |
tree | 9f9b72bbad86982b605b4b8f44fe11b348b6f85c /src/odbc/pg.sql | |
parent | * src/mod_privacy.erl: Use hooks instead of direct function calls (diff) |
* src/mod_privacy_odbc.erl: Privacy rules support using odbc
* src/odbc/pg.sql: Likewise
* src/web/ejabberd_http_poll.erl: Bugfix
SVN Revision: 660
Diffstat (limited to 'src/odbc/pg.sql')
-rw-r--r-- | src/odbc/pg.sql | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/odbc/pg.sql b/src/odbc/pg.sql index 9246c591..ba9ba089 100644 --- a/src/odbc/pg.sql +++ b/src/odbc/pg.sql @@ -99,7 +99,15 @@ CREATE TABLE privacy_default_list ( CREATE TABLE privacy_list ( username text NOT NULL, name text NOT NULL, - type character(1) NOT NULL, + id SERIAL UNIQUE +); + +CREATE INDEX i_privacy_list_username ON privacy_list USING btree (username); +CREATE UNIQUE INDEX i_privacy_list_username_name ON privacy_list USING btree (username, name); + +CREATE TABLE privacy_list_data ( + id bigint REFERENCES privacy_list(id) ON DELETE CASCADE, + t character(1) NOT NULL, value text NOT NULL, action character(1) NOT NULL, ord NUMERIC NOT NULL, @@ -110,7 +118,6 @@ CREATE TABLE privacy_list ( match_presence_out boolean NOT NULL ); -CREATE INDEX i_privacy_list_username ON privacy_list USING btree (username); --- To update from 0.9.8: |