mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-14 23:11:42 +00:00
17 lines
875 B
Ruby
17 lines
875 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Tabla de traducción de cadenas usada por Mobility
|
|
class CreateStringTranslations < ActiveRecord::Migration[5.2]
|
|
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, %i[translatable_id translatable_type locale key], unique: true, name: :index_mobility_string_translations_on_keys
|
|
add_index :mobility_string_translations, %i[translatable_id translatable_type key], name: :index_mobility_string_translations_on_translatable_attribute
|
|
add_index :mobility_string_translations, %i[translatable_type key value locale], name: :index_mobility_string_translations_on_query_keys
|
|
end
|
|
end
|