Class: AddIndexToNeutralVotes
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddIndexToNeutralVotes
- Defined in:
- lib/generators/neutral/install/templates/index_votes.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
7 8 9 10 |
# File 'lib/generators/neutral/install/templates/index_votes.rb', line 7 def self.down remove_index :neutral_votes, :voter_id remove_index :neutral_votes, [:voteable_type, :voteable_id] end |
.up ⇒ Object
2 3 4 5 |
# File 'lib/generators/neutral/install/templates/index_votes.rb', line 2 def self.up add_index :neutral_votes, :voter_id add_index :neutral_votes, [:voteable_type, :voteable_id] end |