imip-agent

conf/postgresql/schema.sql

1083:e4d943f37608
2016-03-09 Paul Boddie Added initial support for database-resident data stores. freebusy-collections
     1 -- Object store tables.     2      3 create table objects (     4     store_user varchar not null,     5     object_uid varchar not null,     6     object_text varchar not null,     7     status varchar not null, -- 'active', 'cancelled'     8     primary key(store_user, object_uid)     9 );    10     11 create table countered_objects (    12     store_user varchar not null,    13     other varchar not null,    14     object_uid varchar not null,    15     object_text varchar not null,    16     primary key(store_user, object_uid)    17 );    18     19 create table recurrences (    20     store_user varchar not null,    21     object_uid varchar not null,    22     object_recurrenceid varchar not null,    23     object_text varchar not null,    24     status varchar not null, -- 'active', 'cancelled'    25     primary key(store_user, object_uid, object_recurrenceid)    26 );    27     28 create table countered_recurrences (    29     store_user varchar not null,    30     other varchar not null,    31     object_uid varchar not null,    32     object_recurrenceid varchar not null,    33     object_text varchar not null,    34     primary key(store_user, object_uid, object_recurrenceid)    35 );    36     37 -- Object store free/busy details.    38     39 create table freebusy (    40     store_user varchar not null,    41     "start" varchar not null,    42     "end" varchar not null,    43     object_uid varchar,    44     transp varchar,    45     object_recurrenceid varchar,    46     summary varchar,    47     organiser varchar,    48     expires varchar    49 );    50     51 create table freebusy_offers (    52     store_user varchar not null,    53     "start" varchar not null,    54     "end" varchar not null,    55     object_uid varchar,    56     transp varchar,    57     object_recurrenceid varchar,    58     summary varchar,    59     organiser varchar,    60     expires varchar    61 );    62     63 create table freebusy_other (    64     store_user varchar not null,    65     other varchar not null,    66     "start" varchar not null,    67     "end" varchar not null,    68     object_uid varchar,    69     transp varchar,    70     object_recurrenceid varchar,    71     summary varchar,    72     organiser varchar,    73     expires varchar    74 );    75     76 create table freebusy_providers (    77     store_user varchar not null,    78     object_uid varchar not null,    79     object_recurrenceid varchar    80 );    81     82 create table freebusy_provider_datetimes (    83     store_user varchar not null,    84     "start" varchar not null    85 );    86     87 -- Object store request details.    88     89 create table requests (    90     store_user varchar not null,    91     object_uid varchar not null,    92     object_recurrenceid varchar,    93     request_type varchar    94 );    95     96     97     98 -- Journal store tables.    99    100 -- Journal free/busy details.   101    102 create table quota_freebusy (   103     quota varchar not null,   104     user_group varchar not null,   105     "start" varchar not null,   106     "end" varchar not null,   107     object_uid varchar,   108     transp varchar,   109     object_recurrenceid varchar,   110     summary varchar,   111     organiser varchar,   112     expires varchar   113 );   114    115 create table user_freebusy (   116     quota varchar not null,   117     store_user varchar not null,   118     "start" varchar not null,   119     "end" varchar not null,   120     object_uid varchar,   121     transp varchar,   122     object_recurrenceid varchar,   123     summary varchar,   124     organiser varchar,   125     expires varchar   126 );   127    128 -- Journal user groups and limits.   129    130 create table quota_limits (   131     user_group varchar not null,   132     quota_limit varchar not null,   133     primary key(user_group)   134 );   135    136 create table user_groups (   137     store_user varchar not null,   138     user_group varchar not null,   139     primary key(store_user, user_group)   140 );