mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-02 14:11:46 +01:00
Merge pull request #129 from zoombody/bug/1351-note-migration-2.1
Reload columns before rendering notes during migration
This commit is contained in:
commit
37d98df7db
1 changed files with 2 additions and 0 deletions
|
|
@ -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!}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue