"Fossies" - the Fresh Open Source Software Archive

Member "roundcubemail-1.4.2/SQL/postgres/2009103100.sql" (1 Jan 2020, 1125 Bytes) of package /linux/www/roundcubemail-1.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PL/SQL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 -- Updates from version 0.3.1
    2 
    3 DROP INDEX identities_user_id_idx;
    4 CREATE INDEX identities_user_id_idx ON identities (user_id, del);
    5 
    6 ALTER TABLE identities ADD changed timestamp with time zone DEFAULT now() NOT NULL;
    7 
    8 CREATE SEQUENCE contactgroups_ids
    9     INCREMENT BY 1
   10     NO MAXVALUE
   11     NO MINVALUE
   12     CACHE 1;
   13 
   14 CREATE TABLE contactgroups (
   15     contactgroup_id integer DEFAULT nextval('contactgroups_ids'::text) PRIMARY KEY,
   16     user_id integer NOT NULL
   17         REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE,
   18     changed timestamp with time zone DEFAULT now() NOT NULL,
   19     del smallint NOT NULL DEFAULT 0,
   20     name varchar(128) NOT NULL DEFAULT ''
   21 );
   22 
   23 CREATE INDEX contactgroups_user_id_idx ON contactgroups (user_id, del);
   24 
   25 CREATE TABLE contactgroupmembers (
   26     contactgroup_id integer NOT NULL
   27         REFERENCES contactgroups(contactgroup_id) ON DELETE CASCADE ON UPDATE CASCADE,
   28     contact_id integer NOT NULL
   29         REFERENCES contacts(contact_id) ON DELETE CASCADE ON UPDATE CASCADE,
   30     created timestamp with time zone DEFAULT now() NOT NULL,
   31     PRIMARY KEY (contactgroup_id, contact_id)
   32 );