1 2 3 4 5 6 7 8 9
class AddIndexOnChangesetsScmid < ActiveRecord::Migration def self.up add_index :changesets, [:repository_id, :scmid], :name => :changesets_repos_scmid end def self.down remove_index :changesets, :name => :changesets_repos_scmid end end