update migration to make the default nil instead of empty string to maintain backward compatibility

running 2.0 (old aasm) tests on migrated db gives a lot of errors because of the empty string
This commit is contained in:
Reinier Balt 2011-06-10 22:43:07 +02:00
parent 056dbf08a7
commit c2be07c6c3

View file

@ -1,8 +1,8 @@
class AdaptToNewAasm < ActiveRecord::Migration
def self.up
change_column :todos, :state, :string, :limit => 20, :default => "", :null => false
change_column :projects, :state, :string, :limit => 20, :default => "", :null => false
change_column :recurring_todos, :state, :string, :limit => 20, :default => "", :null => false
change_column_default :todos, :state, nil
change_column_default :projects, :state, nil
change_column_default :recurring_todos, :state, nil
end
def self.down