X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/53b4d645d80cbe4ac397cfc004e8985317aed6a8..99c54bc5b6c06f9457d45cdd42bd078b20ffb779:/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..db011d83f 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[5.0] 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