Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 22 lines (20 sloc) 0.575 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
class CreateTranslationTables < ActiveRecord::Migration
  def self.up
    create_table :translation_keys do |t|
      t.string :key, :unique=>true, :null=>false
      t.timestamps
    end
    add_index :translation_keys, :key #I am not sure if this helps....

    create_table :translation_texts do |t|
      t.text :text
      t.string :locale
      t.integer :translation_key_id, :null=>false
      t.timestamps
    end
    add_index :translation_texts, :translation_key_id
  end

  def self.down
    drop_table :translation_keys
    drop_table :translation_texts
  end
end
Something went wrong with that request. Please try again.