From 969d225892c9bd755674ce27a2ede6a8b258b359 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Tue, 4 Dec 2012 18:44:58 -0500 Subject: [PATCH] Reload columns before rendering notes during migration Fixes #1351 --- db/migrate/20120412072508_add_rendered_notes.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20120412072508_add_rendered_notes.rb b/db/migrate/20120412072508_add_rendered_notes.rb index 25fa4603..0e60c68c 100644 --- a/db/migrate/20120412072508_add_rendered_notes.rb +++ b/db/migrate/20120412072508_add_rendered_notes.rb @@ -2,6 +2,8 @@ class AddRenderedNotes < ActiveRecord::Migration def self.up add_column :todos, 'rendered_notes', :text + Todo.reset_column_information + puts "-- Clearing show_from dates from completed todos" # clear up completed todos that have show_from set. These could have been left over from before the AASM migration Todo.completed.find(:all, :conditions =>[ "NOT(show_from IS NULL)"]).each {|t| t.show_from=nil; t.save!}