README.md in data_tasks-0.1.0 vs README.md in data_tasks-0.2.0
- old
+ new
@@ -30,9 +30,38 @@
Run all pending data tasks with rake:
rake data:migrate
+## Common Problems
+
+If you're running your Rails processes in threadsafe mode, you'll get errors about undefined
+constants when trying to access model classes. You'll need to disable while running
+rake tasks. In your environment file (ex. `config/environments/production.rb`), change:
+
+ config.threadsafe!
+
+to:
+
+ config.threadsafe! unless $rails_rake_task
+
+If you don't want to make that change, you can explicitly load the required model classes
+inside the migration class, or define stub model classes. For example, if you wanted to
+add a new SideHatch record in the migration, you could define:
+
+ class SideHatch < ActiveRecord::Base; end
+
+ class CreateSideHatch < ActiveRecord::Migration
+ def up
+ SideHatch.create!(size: 49)
+ end
+ end
+
+## Future
+
+ * Add a capistrano hook to run data migrations after schema migrations
+ * Add a heroku-san deployment strategy
+
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)