Script to Delete Historical Data
To run this script:
Clone the production database to a database for a support/qa/dev environment
Copy
drop_data.rbinto/srv/www/apps/revenue_accountingon the target environmentEdit the number at the top of the file to indicate how many months of data to keep
Run
ruby drop_data.rband wait for it to completeShrink the database to reclaim empty space