5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 15:56:20 +00:00
panel/db/migrate/20190716195811_create_text_translations.rb

17 lines
726 B
Ruby
Raw Permalink Normal View History

2019-07-17 22:18:48 +00:00
# frozen_string_literal: true
# Tabla de traducción de textos utilizada por Mobility
class CreateTextTranslations < ActiveRecord::Migration[5.2]
def change
create_table :mobility_text_translations do |t|
t.string :locale, null: false
t.string :key, null: false
t.text :value
t.references :translatable, polymorphic: true, index: false
t.timestamps null: false
end
add_index :mobility_text_translations, %i[translatable_id translatable_type locale key], unique: true, name: :index_mobility_text_translations_on_keys
add_index :mobility_text_translations, %i[translatable_id translatable_type key], name: :index_mobility_text_translations_on_translatable_attribute
end
end