Commit 4c48c905a726cf5dd2a7f410ad76b6e763e746bd
Exists in
master
and in
22 other branches
Merge commit 'refs/merge-requests/262' of git://gitorious.org/noosfero/noosfero …
…into merge-requests/262
Showing
1 changed file
with
39 additions
and
0 deletions
Show diff stats
db/migrate/20130111232201_aggressive_indexing_strategy3.rb
0 → 100644
... | ... | @@ -0,0 +1,39 @@ |
1 | +class AggressiveIndexingStrategy3 < ActiveRecord::Migration | |
2 | + def self.up | |
3 | + add_index :articles, :slug | |
4 | + add_index :articles, :parent_id | |
5 | + add_index :articles, :profile_id | |
6 | + add_index :articles, :name | |
7 | + | |
8 | + add_index :article_versions, :article_id | |
9 | + | |
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 | |
19 | + end | |
20 | + | |
21 | + def self.down | |
22 | + remove_index :articles, :slug | |
23 | + remove_index :articles, :parent_id | |
24 | + remove_index :articles, :profile_id | |
25 | + remove_index :articles, :name | |
26 | + | |
27 | + remove_index :article_versions, :article_id | |
28 | + | |
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 | |
38 | + end | |
39 | +end | ... | ... |