Add to git.
[monolith.git] / sql / ml_user_directory_create.sql
1 -- Create schema for monolith user directory.
2 -- - by Richard W.M. Jones <rich@annexia.org>
3 --
4 -- This library is free software; you can redistribute it and/or
5 -- modify it under the terms of the GNU Library General Public
6 -- License as published by the Free Software Foundation; either
7 -- version 2 of the License, or (at your option) any later version.
8 --
9 -- This library is distributed in the hope that it will be useful,
10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 -- Library General Public License for more details.
13 --
14 -- You should have received a copy of the GNU Library General Public
15 -- License along with this library; if not, write to the Free
16 -- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 --
18 -- $Id: ml_user_directory_create.sql,v 1.2 2002/11/15 20:46:03 rich Exp $
19 --
20 -- Depends: monolith_core, monolith_users
21
22 -- The user directory is strictly "opt-in". If a user is not listed in
23 -- this table, then they do not want to appear in the directory. We
24 -- need to refine this in the future so that the ML_USERS table contains
25 -- more information about what details people want to be revealed to
26 -- others.
27
28 begin work;
29
30 create table ml_userdir_prefs
31 (
32         userid int4             -- User ID
33                 constraint ml_userdir_prefs_userid_pk
34                 primary key
35                 references ml_users (userid)
36                 on delete cascade
37 );
38
39 -- Grant access to the webserver.
40
41 grant select, insert, update, delete on ml_userdir_prefs to nobody;
42
43 commit work;