Class: CreateSurveyTranslations

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

Class Method Summary collapse

Class Method Details

.downObject



16
17
18
# File 'lib/generators/surveyor/templates/db/migrate/create_survey_translations.rb', line 16

def self.down
  drop_table :surveys
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/generators/surveyor/templates/db/migrate/create_survey_translations.rb', line 3

def self.up
  create_table :survey_translations do |t|
    # Content
    t.integer :survey_id

    # Reference
    t.string :locale
    t.text :translation

    t.timestamps
  end
end