diff options
author | alecpl <alec@alec.pl> | 2010-10-06 13:00:12 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-10-06 13:00:12 +0000 |
commit | ace511a771656c983046919333cee501339c98a1 (patch) | |
tree | e0cf919256f349da6ee939f582fd04428cc8d6d4 /SQL/postgres.update.sql | |
parent | fec0704423075a1a5199d1c455a3ee0f7ea00ab3 (diff) |
- Add unique index on users.username+users.mail_host
Diffstat (limited to 'SQL/postgres.update.sql')
-rw-r--r-- | SQL/postgres.update.sql | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql index 1ef93d8b6..99b9c0e29 100644 --- a/SQL/postgres.update.sql +++ b/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); + |