projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46c76da
)
Tweak migration to ensure that migrating from a database with existing
author
Tom Hughes
<tom@compton.nu>
Sun, 7 Jun 2009 10:01:28 +0000
(10:01 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sun, 7 Jun 2009 10:01:28 +0000
(10:01 +0000)
diary entries sets a default language for those entries.
db/migrate/033_change_diary_entries_language.rb
patch
|
blob
|
history
diff --git
a/db/migrate/033_change_diary_entries_language.rb
b/db/migrate/033_change_diary_entries_language.rb
index 2ca844884610b1902651f2cac2233987797be644..674ae3d49a7486e0f09a275df8dd81b90bc32b6c 100644
(file)
--- 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