Sha256: 0fae0be803eb76b991b20fb7dd7d1f64adc4b7f150e1be83a3329c8f58728cad

Contents?: true

Size: 812 Bytes

Versions: 13

Compression:

Stored size: 812 Bytes

Contents

class CreateStringTranslations < <%= activerecord_migration_class %>

  def change
    create_table :mobility_string_translations do |t|
      t.string :locale, null: false
      t.string :key, null: false
      t.string :value
      t.references :translatable, polymorphic: true, index: false
      t.timestamps null: false
    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

13 entries across 13 versions & 1 rubygems

Version Path
mobility-1.0.0.rc1 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-1.0.0.beta2 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-1.0.0.beta1 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-1.0.0.alpha lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.13 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.11 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.10 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.9 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.8 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.7 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.6 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.5 lib/rails/generators/mobility/templates/create_string_translations.rb
mobility-0.8.4 lib/rails/generators/mobility/templates/create_string_translations.rb