diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-14 20:46:48 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-14 20:46:48 +0000 |
| commit | 1e1ad9ee81069a18c3bbe0101f405491d977b1bf (patch) | |
| tree | 32dc1f66b2575ba9642696e5fbc4b311ade728cf /roundcubemail/SQL/sqlite.update.sql | |
| parent | 2e91bb700b0ea556d4780a4d80703f3ce8473391 (diff) | |
Fulltext search over contact fields. Attention: DATABASE SCHEMA CHANGED\!
git-svn-id: https://svn.roundcube.net/trunk@4541 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/SQL/sqlite.update.sql')
| -rw-r--r-- | roundcubemail/SQL/sqlite.update.sql | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/roundcubemail/SQL/sqlite.update.sql b/roundcubemail/SQL/sqlite.update.sql index 6f2acf913..46373d8b0 100644 --- a/roundcubemail/SQL/sqlite.update.sql +++ b/roundcubemail/SQL/sqlite.update.sql @@ -182,3 +182,42 @@ DROP TABLE contacts_tmp; DELETE FROM messages; + +-- Updates from version 0.5.x + +CREATE TABLE contacts_tmp ( + contact_id integer NOT NULL PRIMARY KEY, + user_id integer NOT NULL default '0', + changed datetime NOT NULL default '0000-00-00 00:00:00', + del tinyint NOT NULL default '0', + name varchar(128) NOT NULL default '', + email varchar(255) NOT NULL default '', + firstname varchar(128) NOT NULL default '', + surname varchar(128) NOT NULL default '', + vcard text NOT NULL default '' +); + +INSERT INTO contacts_tmp (contact_id, user_id, changed, del, name, email, firstname, surname, vcard) + SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard FROM contacts; + +DROP TABLE contacts; +CREATE TABLE contacts ( + contact_id integer NOT NULL PRIMARY KEY, + user_id integer NOT NULL default '0', + changed datetime NOT NULL default '0000-00-00 00:00:00', + del tinyint NOT NULL default '0', + name varchar(128) NOT NULL default '', + email varchar(255) NOT NULL default '', + firstname varchar(128) NOT NULL default '', + surname varchar(128) NOT NULL default '', + vcard text NOT NULL default '', + words text NOT NULL default '' +); + +INSERT INTO contacts (contact_id, user_id, changed, del, name, email, firstname, surname, vcard) + SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard FROM contacts_tmp; + +CREATE INDEX ix_contacts_user_id ON contacts(user_id, email); +DROP TABLE contacts_tmp; + +DELETE FROM messages; |
