mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
15 lines
450 B
Ruby
15 lines
450 B
Ruby
class RemoveRenderedNotes < ActiveRecord::Migration[5.2]
|
|
def self.up
|
|
remove_column :todos, 'rendered_notes'
|
|
end
|
|
|
|
def self.down
|
|
add_column :todos, 'rendered_notes', :text
|
|
|
|
# Call save on each todo to force generation of rendered_notes
|
|
# Copied from 20120412072508_add_rendered_notes
|
|
say "Rendering todo notes..."
|
|
Todo.all.each{ |todo| todo.save(validate: false) }
|
|
say "Finished rendering todo notes."
|
|
end
|
|
end
|