"Fossies" - the Fresh Open Source Software Archive

Member "roundcubemail-1.4.2/SQL/sqlite/2011121400.sql" (1 Jan 2020, 1424 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.7
    2 
    3 CREATE TABLE contacts_tmp (
    4   contact_id integer NOT NULL PRIMARY KEY,
    5   user_id integer NOT NULL,
    6   changed datetime NOT NULL default '0000-00-00 00:00:00',
    7   del tinyint NOT NULL default '0',
    8   name varchar(128) NOT NULL default '',
    9   email text NOT NULL default '',
   10   firstname varchar(128) NOT NULL default '',
   11   surname varchar(128) NOT NULL default '',
   12   vcard text NOT NULL default '',
   13   words text NOT NULL default ''
   14 );
   15 
   16 INSERT INTO contacts_tmp (contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words)
   17     SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words FROM contacts;
   18 
   19 DROP TABLE contacts;
   20 
   21 CREATE TABLE contacts (
   22   contact_id integer NOT NULL PRIMARY KEY,
   23   user_id integer NOT NULL,
   24   changed datetime NOT NULL default '0000-00-00 00:00:00',
   25   del tinyint NOT NULL default '0',
   26   name varchar(128) NOT NULL default '',
   27   email text NOT NULL default '',
   28   firstname varchar(128) NOT NULL default '',
   29   surname varchar(128) NOT NULL default '',
   30   vcard text NOT NULL default '',
   31   words text NOT NULL default ''
   32 );
   33 
   34 INSERT INTO contacts (contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words)
   35     SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words FROM contacts_tmp;
   36 
   37 CREATE INDEX ix_contacts_user_id ON contacts(user_id, del);
   38 DROP TABLE contacts_tmp;