From bb1198fb619b132ee0623b64e505907aa18b4c72 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 7 Jun 2009 10:01:28 +0000 Subject: [PATCH] Tweak migration to ensure that migrating from a database with existing diary entries sets a default language for those entries. --- db/migrate/033_change_diary_entries_language.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/033_change_diary_entries_language.rb b/db/migrate/033_change_diary_entries_language.rb index 2ca844884..674ae3d49 100644 --- a/db/migrate/033_change_diary_entries_language.rb +++ b/db/migrate/033_change_diary_entries_language.rb @@ -1,7 +1,7 @@ class ChangeDiaryEntriesLanguage < ActiveRecord::Migration def self.up remove_column "diary_entries", "language" - add_column "diary_entries", "language_code", :string + add_column "diary_entries", "language_code", :string, :null => false, :default => "en" end def self.down -- 2.39.5