Class: AddLangToTexts

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/templates/20191112095018_add_lang_to_texts.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
# File 'lib/generators/templates/20191112095018_add_lang_to_texts.rb', line 2

def change
  add_column :texts, :lang, :string
  remove_index :texts, [:scope, :key]
  add_index :texts, [:scope, :lang, :key], unique: true
end