ref: master
db/migrate/20110127174236_remove_action_tracker_record_with_nil_users.rb
1 2 3 4 5 6 7 8 9
class RemoveActionTrackerRecordWithNilUsers < ActiveRecord::Migration def self.up ActionTracker::Record.all.map {|record| record.destroy if record.user.nil?} end def self.down say "this migration can't be reverted" end end