X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/53b4d645d80cbe4ac397cfc004e8985317aed6a8..644184d254aacf0b7fc83d1b8c67c2a12230c833:/db/migrate/033_change_diary_entries_language.rb diff --git a/db/migrate/033_change_diary_entries_language.rb b/db/migrate/033_change_diary_entries_language.rb index 7d4fa1713..6c3ae7de2 100644 --- a/db/migrate/033_change_diary_entries_language.rb +++ b/db/migrate/033_change_diary_entries_language.rb @@ -1,9 +1,11 @@ -class ChangeDiaryEntriesLanguage < ActiveRecord::Migration +class ChangeDiaryEntriesLanguage < ActiveRecord::Migration[4.2] def self.up - change_column "diary_entries", "language", :string, :default => "en", :null => false + remove_column "diary_entries", "language" + add_column "diary_entries", "language_code", :string, :null => false, :default => "en" end def self.down - change_column "diary_entries", "language", :string, :limit => 3, :default => nil, :null => true + remove_column "diary_entries", "language_code" + add_column "diary_entries", "language", :string, :limit => 3 end end