posts: add partial indexes on is_pending, is_flagged.

This commit is contained in:
evazion
2017-06-07 23:51:02 -05:00
parent bb0be36f05
commit ec9a3e5c17
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
class AddPendingFlaggedIndexesToPosts < ActiveRecord::Migration
def change
Post.without_timeout do
add_index :posts, :is_pending, where: "is_pending = true"
add_index :posts, :is_flagged, where: "is_flagged = true"
end
end
end