]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/033_change_diary_entries_language.rb
Adapt tab borders to secondary body background
[rails.git] / db / migrate / 033_change_diary_entries_language.rb
index 7d4fa1713e6722f8e5b6afaebceb5239209e9b2d..6c3ae7de27165eec0d3181abc74e17095bf7cc58 100644 (file)
@@ -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