Files
growstuff/script/deploy-tasks.sh
Skud 99bfc704dc Added plantings_count (i.e. counter_cache) to Member
Also removed the superfluous .plantings_count method on Crop, which was
causing some confusion.

A thing we learned today: we should use .size to find the size of
ActiveRecord collections, not .count, because .count doesn't use the
cache (while .size does).
2013-08-26 13:54:09 +10:00

17 lines
545 B
Bash
Executable File

#!/bin/bash
# tasks to run at deploy time, usually after 'rake db:migrate'
# When adding tasks, do so in chronological order, and note the date
# when it was added. This will help us know which ones have been run
# and can safely be commented out or removed.
echo "2013-08-21 - set default crop creator"
rake growstuff:oneoff:set_default_crop_creator
echo "2013-08-26 - set planting owner"
rake growstuff:oneoff:set_planting_owner
echo "2013-08-26 - initialize member planting count"
rake growstuff:oneoff:initialize_member_planting_count