Write rake tasks to replace those of ActiveRecord