diff options
| author | Aurélien Bompard <aurelien@bompard.org> | 2012-10-02 15:49:41 +0200 |
|---|---|---|
| committer | Aurélien Bompard <aurelien@bompard.org> | 2012-10-02 15:49:41 +0200 |
| commit | 55b91e39d5c9e00be349bb55c9afc7c9d58f8941 (patch) | |
| tree | b92c03bcb3e0ac838df8dc05519d2fec2f72377f | |
| parent | 4f396b8956fba81221e9c62d8731134343c561d1 (diff) | |
| download | kittystore-55b91e39d5c9e00be349bb55c9afc7c9d58f8941.tar.gz kittystore-55b91e39d5c9e00be349bb55c9afc7c9d58f8941.tar.xz kittystore-55b91e39d5c9e00be349bb55c9afc7c9d58f8941.zip | |
Fix DB indexes
| -rw-r--r-- | kittystore/storm/schema/__init__.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kittystore/storm/schema/__init__.py b/kittystore/storm/schema/__init__.py index edb6d7d..c7d3f75 100644 --- a/kittystore/storm/schema/__init__.py +++ b/kittystore/storm/schema/__init__.py @@ -35,9 +35,8 @@ CREATES = { PRIMARY KEY (list_name, message_id, counter) );""", 'CREATE INDEX "ix_email_list_name" ON "email" (list_name);', - 'CREATE UNIQUE INDEX "ix_email_message_id" ON "email" (message_id);', 'CREATE INDEX "ix_email_date" ON "email" (date);', - 'CREATE UNIQUE INDEX "ix_email_message_id_hash" ON "email" (message_id_hash);', + 'CREATE UNIQUE INDEX "ix_email_list_name_message_id_hash" ON "email" (list_name, message_id_hash);', 'CREATE INDEX "ix_email_subject" ON "email" (subject);', 'CREATE INDEX "ix_email_thread_id" ON "email" (thread_id);', ], @@ -74,9 +73,8 @@ CREATES = { PRIMARY KEY (list_name, message_id, counter) );""", 'CREATE INDEX "ix_email_list_name" ON "email" USING btree (list_name);', - 'CREATE UNIQUE INDEX "ix_email_message_id" ON "email" USING btree (message_id);', 'CREATE INDEX "ix_email_date" ON "email" USING btree (date);', - 'CREATE UNIQUE INDEX "ix_email_message_id_hash" ON "email" USING btree (message_id_hash);', + 'CREATE UNIQUE INDEX "ix_email_list_name_message_id_hash" ON "email" USING btree (list_name, message_id_hash);', 'CREATE INDEX "ix_email_subject" ON "email" USING btree (subject);', 'CREATE INDEX "ix_email_thread_id" ON "email" USING btree (thread_id);', ], |
