Class: CreateTranslations

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/i18n/active_record/install/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/generators/i18n/active_record/install/templates/migration.rb', line 2

def change
  create_table :translations do |t|
    t.string  :locale
    t.string  :key
    t.text    :value
    t.text    :interpolations
    t.boolean :is_proc, :default => false

    t.timestamps
  end

  add_index :translations, [:locale, :key], :unique => true
end