discourse/db/migrate/20190313171338_add_indexes_to_reviewables.rb
Robin Ward b58867b6e9 FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API
backwards compatibility.

Co-Authored-By: romanrizzi <romanalejandro@gmail.com>
Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
2019-03-28 12:45:10 -04:00

12 lines
278 B
Ruby

class AddIndexesToReviewables < ActiveRecord::Migration[5.2]
def up
remove_index :reviewables, :status
add_index :reviewables, [:status, :created_at]
end
def down
remove_index :reviewables, [:status, :created_at]
add_index :reviewables, :status
end
end