Class: UpdateSurveyTables

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

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/generators/templates/migration_update_survey_tables.rb', line 2

def change
  #Survey Surveys table
  add_column :survey_surveys, :locale_name, :string
  add_column :survey_surveys, :locale_description, :text
  
  #Survey Sections table
  add_column :survey_sections, :locale_head_number, :string
  add_column :survey_sections, :locale_name, :string
  add_column :survey_sections, :locale_description, :text
  
  #Survey Questions table
  add_column :survey_questions, :head_number, :string
  add_column :survey_questions, :description, :text
  add_column :survey_questions, :locale_text, :string
  add_column :survey_questions, :locale_head_number, :string
  add_column :survey_questions, :locale_description, :text
  
  #Survey Options table
  add_column :survey_options, :locale_text, :string
end