diff options
author | Evan Prodromou <evan@status.net> | 2009-11-14 17:14:35 +0100 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-14 17:14:35 +0100 |
commit | 959d278c347fdf90e0227adc57c0215f5d82404a (patch) | |
tree | 16eb3b0155b446ada520566e187b4c47b0b9e76b /db/08to09_pg.sql | |
parent | 093857c582a68b39e0d65523d27f25ede7b7fed6 (diff) | |
parent | 2147ac510f5489c860a4bebf3ab48a069b89ecfb (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'db/08to09_pg.sql')
-rw-r--r-- | db/08to09_pg.sql | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql index 004c77b36..d9b57fb84 100644 --- a/db/08to09_pg.sql +++ b/db/08to09_pg.sql @@ -40,20 +40,23 @@ create table user_role ( ); create table login_token ( - user_id integer not null /* comment 'user owning this token'*/ references user (id), + user_id integer not null /* comment 'user owning this token'*/ references "user" (id), token char(32) not null /* comment 'token useable for logging in'*/, created timestamp not null DEFAULT CURRENT_TIMESTAMP /* comment 'date this record was created'*/, modified timestamp /* comment 'date this record was modified'*/, - constraint primary key (user_id) + primary key (user_id) ); -alter table fave - drop index fave_user_id_idx, - add index fave_user_id_idx using btree(user_id,modified); +DROP index fave_user_id_idx; +CREATE index fave_user_id_idx on fave (user_id,modified); + +DROP index subscription_subscriber_idx; +CREATE index subscription_subscriber_idx ON subscription (subscriber,created); + +DROP index subscription_subscribed_idx; +CREATE index subscription_subscribed_idx ON subscription (subscribed,created); + +DROP index notice_profile_id_idx; +CREATE index notice_profile_id_idx ON notice (profile_id,created,id); -alter table subscription - drop index subscription_subscriber_idx, - add index subscription_subscriber_idx using btree(subscriber,created), - drop index subscription_subscribed_idx, - add index subscription_subscribed_idx using btree(subscribed,created); |