Class: AddIndexToNeutralVotings

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/neutral/install/templates/index_votings.rb

Class Method Summary collapse

Class Method Details

.downObject



6
7
8
# File 'lib/generators/neutral/install/templates/index_votings.rb', line 6

def self.down
  remove_index :neutral_votings, [:votingable_type, :votingable_id]
end

.upObject



2
3
4
# File 'lib/generators/neutral/install/templates/index_votings.rb', line 2

def self.up
  add_index :neutral_votings, [:votingable_type, :votingable_id]
end