From 058cac7b020c1fff4985cf92316c40002d4e5fe9 Mon Sep 17 00:00:00 2001 From: alec Date: Wed, 6 Oct 2010 13:00:12 +0000 Subject: - Add unique index on users.username+users.mail_host git-svn-id: https://svn.roundcube.net/trunk@4053 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/SQL/postgres.update.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'roundcubemail/SQL/postgres.update.sql') diff --git a/roundcubemail/SQL/postgres.update.sql b/roundcubemail/SQL/postgres.update.sql index 1ef93d8b6..99b9c0e29 100644 --- a/roundcubemail/SQL/postgres.update.sql +++ b/roundcubemail/SQL/postgres.update.sql @@ -56,7 +56,7 @@ CREATE SEQUENCE contactgroups_ids NO MAXVALUE NO MINVALUE CACHE 1; - + CREATE TABLE contactgroups ( contactgroup_id integer DEFAULT nextval('contactgroups_ids'::text) PRIMARY KEY, user_id integer NOT NULL @@ -81,3 +81,9 @@ CREATE TABLE contactgroupmembers ( ALTER TABLE users ALTER last_login DROP NOT NULL; ALTER TABLE users ALTER last_login SET DEFAULT NULL; + +-- Updates from version 0.4.2 + +DROP INDEX users_username_id_idx; +ALTER TABLE users ADD UNIQUE (username, mail_host); + -- cgit v1.2.3