Add a list of languages and fix a few issues with the schema. Also get
[rails.git] / db / migrate / 033_change_diary_entries_language.rb
index 7d4fa1713e6722f8e5b6afaebceb5239209e9b2d..2ca844884610b1902651f2cac2233987797be644 100644 (file)
@@ -1,9 +1,11 @@
 class ChangeDiaryEntriesLanguage < ActiveRecord::Migration
   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
   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