Commit 88785ea1689929f133eea2c30e24e75ec3147609
1 parent
f47c2f61
Exists in
master
and in
29 other branches
Removing wrong index and adding others
Showing
1 changed file
with
18 additions
and
2 deletions
Show diff stats
db/migrate/20130111232201_aggressive_indexing_strategy3.rb
@@ -3,21 +3,37 @@ class AggressiveIndexingStrategy3 < ActiveRecord::Migration | @@ -3,21 +3,37 @@ class AggressiveIndexingStrategy3 < ActiveRecord::Migration | ||
3 | add_index :articles, :slug | 3 | add_index :articles, :slug |
4 | add_index :articles, :parent_id | 4 | add_index :articles, :parent_id |
5 | add_index :articles, :profile_id | 5 | add_index :articles, :profile_id |
6 | - add_index :articles, :translation_of_id | 6 | + add_index :articles, :name |
7 | 7 | ||
8 | add_index :article_versions, :article_id | 8 | add_index :article_versions, :article_id |
9 | 9 | ||
10 | add_index :comments, [:source_id, :spam] | 10 | add_index :comments, [:source_id, :spam] |
11 | + | ||
12 | + add_index :profiles, :identifier | ||
13 | + | ||
14 | + add_index :friendships, :person_id | ||
15 | + add_index :friendships, :friend_id | ||
16 | + add_index :friendships, [:person_id, :friend_id], :uniq => true | ||
17 | + | ||
18 | + add_index :external_feeds, :blog_id | ||
11 | end | 19 | end |
12 | 20 | ||
13 | def self.down | 21 | def self.down |
14 | remove_index :articles, :slug | 22 | remove_index :articles, :slug |
15 | remove_index :articles, :parent_id | 23 | remove_index :articles, :parent_id |
16 | remove_index :articles, :profile_id | 24 | remove_index :articles, :profile_id |
17 | - remove_index :articles, :translation_of_id | 25 | + remove_index :articles, :name |
18 | 26 | ||
19 | remove_index :article_versions, :article_id | 27 | remove_index :article_versions, :article_id |
20 | 28 | ||
21 | remove_index :comments, [:source_id, :spam] | 29 | remove_index :comments, [:source_id, :spam] |
30 | + | ||
31 | + remove_index :profiles, :identifier | ||
32 | + | ||
33 | + remove_index :friendships, :person_id | ||
34 | + remove_index :friendships, :friend_id | ||
35 | + remove_index :friendships, [:person_id, :friend_id] | ||
36 | + | ||
37 | + remove_index :external_feeds, :blog_id | ||
22 | end | 38 | end |
23 | end | 39 | end |