]> err.no Git - scalable-opengroupware.org/blob - OGoContentStore/sql/folderinfo-create.psql
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@143 d1b88da0-ebda-0310-925b-ed51d...
[scalable-opengroupware.org] / OGoContentStore / sql / folderinfo-create.psql
1 -- $Id$
2 --
3 -- (C) 2004 SKYRIX Software AG
4 --
5 -- TODO:
6 --   add a unique constraints on path
7
8 CREATE SEQUENCE SOGo_folder_info_seq;
9
10 DROP TABLE SOGo_folder_info;
11
12 CREATE TABLE SOGo_folder_info (
13   c_folder_id  INTEGER 
14     DEFAULT nextval('SOGo_folder_info_seq')
15     NOT NULL 
16     PRIMARY KEY,                     -- the primary key
17   c_path           VARCHAR(255)  NOT NULL, -- the full path to the folder
18   c_path1          VARCHAR(255)  NOT NULL, -- parts (for fast queries)
19   c_path2          VARCHAR(255)  NULL,     -- parts (for fast queries)
20   c_path3          VARCHAR(255)  NULL,     -- parts (for fast queries)
21   c_path4          VARCHAR(255)  NULL,     -- parts (for fast queries)
22   c_foldername     VARCHAR(255)  NOT NULL, -- last path component
23   c_location       VARCHAR(2048) NOT NULL, -- URL to folder
24   c_quick_location VARCHAR(2048) NULL,     -- URL to quicktable of folder
25   c_folder_type    VARCHAR(255)  NOT NULL  -- the folder type ...
26 );
27
28 INSERT INTO SOGo_folder_info 
29   ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
30     c_location, c_quick_location, c_folder_type ) 
31 VALUES 
32   ( '/Users', 
33     'Users',
34     NULL,
35     NULL,
36     NULL,
37     'Users', 
38     'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder', 
39     'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder_quick', 
40     'Container' );
41
42 INSERT INTO SOGo_folder_info 
43   ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, 
44     c_location, c_quick_location, c_folder_type ) 
45 VALUES 
46   ( '/Users/helge', 
47     'Users',
48     'helge',
49     NULL,
50     NULL,
51     'helge', 
52     'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder', 
53     'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder_quick', 
54     'Container' );
55
56 INSERT INTO SOGo_folder_info 
57   ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, 
58     c_location, c_quick_location, c_folder_type ) 
59 VALUES 
60   ( '/Users/helge/Calendar', 
61     'Users',
62     'helge',
63     'Calendar',
64      NULL,
65     'Calendar', 
66     'http://OGo:OGo@localhost:5432/OGo/SOGo_helge_privcal', 
67     'http://OGo:OGo@localhost:5432/OGo/SOGo_helge_privcal_quick', 
68     'Appointment' );