How do I stop the db:load and db:migrate rake tasks from running in Heroku CI.

Issue

The Ruby Buildpack automatically runs rake db:schema:load and rake db:migrate to prepare your database for a test run. For some applications this can case problems.

Resolution

To prevent these rake tasks from running you'll need to override them.

This can be in a file like /lib/tasks/prevent-db-on-heroku-ci.rake:

Rake::Task['db:schema:load'].clear
task 'db:schema:load' do
end

Rake::Task['db:migrate'].clear
task 'db:migrate' do
end

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2020 Salesforce.com