"Fossies" - the Fresh Open Source Software Archive

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