Sha256: 316727a5a1f05e1e1090f375eb82aa5f3a87912f64ee8b9329a1b9db556dbcef

Contents?: true

Size: 779 Bytes

Versions: 19

Compression:

Stored size: 779 Bytes

Contents

class CreateStringTranslations < <%= activerecord_migration_class %>

  def change
    create_table :mobility_string_translations do |t|
      t.string  :locale
      t.string  :key
      t.string  :value
      t.integer :translatable_id
      t.string  :translatable_type
      t.timestamps
    end
    add_index :mobility_string_translations, [:translatable_id, :translatable_type, :locale, :key], unique: true, name: :index_mobility_string_translations_on_keys
    add_index :mobility_string_translations, [:translatable_id, :translatable_type, :key], name: :index_mobility_string_translations_on_translatable_attribute
    add_index :mobility_string_translations, [:translatable_type, :key, :value, :locale], name: :index_mobility_string_translations_on_query_keys
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mobility-0.5.1 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.5.0 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.4.3 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.4.2 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.4.1 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.4.0 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.6 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.5 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.4 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.3 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.2 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.1 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.3.0 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.2.3 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.2.2 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.2.1 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.2.0 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.1.20 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.1.19 lib/generators/rails/mobility/templates/create_string_translations.rb