summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/08to09.sql2
-rw-r--r--db/statusnet.sql3
2 files changed, 4 insertions, 1 deletions
diff --git a/db/08to09.sql b/db/08to09.sql
index b10e47dbc..582981614 100644
--- a/db/08to09.sql
+++ b/db/08to09.sql
@@ -110,3 +110,5 @@ insert into queue_item_new (frame,transport,created,claimed)
alter table queue_item rename to queue_item_old;
alter table queue_item_new rename to queue_item;
+alter table file_to_post
+ add index post_id_idx (post_id);
diff --git a/db/statusnet.sql b/db/statusnet.sql
index 4158f0167..4aa37ce1c 100644
--- a/db/statusnet.sql
+++ b/db/statusnet.sql
@@ -523,7 +523,8 @@ create table file_to_post (
post_id integer comment 'id of the notice it belongs to' references notice (id),
modified timestamp comment 'date this record was modified',
- constraint primary key (file_id, post_id)
+ constraint primary key (file_id, post_id),
+ index post_id_idx (post_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;