Class: AddSectionIdToResponses

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/surveyor/templates/db/migrate/add_section_id_to_responses.rb

Class Method Summary collapse

Class Method Details

.downObject



8
9
10
11
# File 'lib/generators/surveyor/templates/db/migrate/add_section_id_to_responses.rb', line 8

def self.down
  remove_index :responses, :survey_section_id
  remove_column :responses, :survey_section_id
end

.upObject



3
4
5
6
# File 'lib/generators/surveyor/templates/db/migrate/add_section_id_to_responses.rb', line 3

def self.up
  add_column :responses, :survey_section_id, :integer
  add_index :responses, :survey_section_id
end