]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/033_change_diary_entries_language.rb
Update to iD v2.6.0
[rails.git] / db / migrate / 033_change_diary_entries_language.rb
index 7d4fa1713e6722f8e5b6afaebceb5239209e9b2d..db011d83f3dfcbedbf098a0e658037423c3c95d9 100644 (file)
@@ -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