Commit f47c2f619336d41096b4df34e6dfc73e9d4b100e

Authored by Daniel Cunha
1 parent 593da77e

Aggressive Indexing Strategy 3

db/migrate/20130111232201_aggressive_indexing_strategy3.rb 0 → 100644
... ... @@ -0,0 +1,23 @@
  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, :translation_of_id
  7 +
  8 + add_index :article_versions, :article_id
  9 +
  10 + add_index :comments, [:source_id, :spam]
  11 + end
  12 +
  13 + def self.down
  14 + remove_index :articles, :slug
  15 + remove_index :articles, :parent_id
  16 + remove_index :articles, :profile_id
  17 + remove_index :articles, :translation_of_id
  18 +
  19 + remove_index :article_versions, :article_id
  20 +
  21 + remove_index :comments, [:source_id, :spam]
  22 + end
  23 +end
... ...