#1140: Add indexes for noteupdater: and artcomm:

This commit is contained in:
Toks
2013-12-09 13:18:48 -05:00
parent ace1975704
commit 74e30ea25b

View File

@@ -0,0 +1,17 @@
class AddUpdaterIdAndPostIdIndexesToNoteVersionsAndArtistCommentaryVersions < ActiveRecord::Migration
def self.up
execute "set statement_timeout = 0"
remove_index :note_versions, :updater_id
remove_index :artist_commentary_versions, :updater_id
add_index :note_versions, [:updater_id, :post_id]
add_index :artist_commentary_versions, [:updater_id, :post_id]
end
def self.down
execute "set statement_timeout = 0"
remove_index :note_versions, [:updater_id, :post_id]
remove_index :artist_commentary_versions, [:updater_id, :post_id]
add_index :note_versions, :updater_id
add_index :artist_commentary_versions, :updater_id
end
end