diff --git a/db/migrate/20140708121356_index_articles_filtered_fields.rb b/db/migrate/20140708121356_index_articles_filtered_fields.rb new file mode 100644 index 0000000..9e91842 --- /dev/null +++ b/db/migrate/20140708121356_index_articles_filtered_fields.rb @@ -0,0 +1,13 @@ +class IndexArticlesFilteredFields < ActiveRecord::Migration + def self.up + %w[articles article_versions].each do |table| + add_index table, [:parent_id] + add_index table, [:path] + add_index table, [:path, :profile_id] + end + add_index :articles, [:type] + add_index :articles, [:type, :parent_id] + add_index :articles, [:type, :profile_id] + end + +end -- libgit2 0.21.2