diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-02 09:27:03 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-02 09:27:03 +0000 |
| commit | 847060fb5a85af8581910c694965c136c677a621 (patch) | |
| tree | a07da67665c26842029e1f9b59b7fbadc963fdf6 /roundcubemail/SQL/sqlite.update.sql | |
| parent | a9b4a030d159738f59e1d782dbf0d17b1a90115f (diff) | |
- Support contact's email addresses up to 255 characters long (#1487095)
- Added email format checks when saving contacts data
git-svn-id: https://svn.roundcube.net/trunk@4166 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/SQL/sqlite.update.sql')
| -rw-r--r-- | roundcubemail/SQL/sqlite.update.sql | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/roundcubemail/SQL/sqlite.update.sql b/roundcubemail/SQL/sqlite.update.sql index 78e283e2d..328693944 100644 --- a/roundcubemail/SQL/sqlite.update.sql +++ b/roundcubemail/SQL/sqlite.update.sql @@ -146,3 +146,37 @@ DROP TABLE tmp_users; DROP INDEX ix_users_username; CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host); +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 '' +); + +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; + |
