Skip to content

Instantly share code, notes, and snippets.

@jrochkind
Last active June 16, 2021 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrochkind/f4977b6fe89bfcac55b3bfdfc869ead5 to your computer and use it in GitHub Desktop.
Save jrochkind/f4977b6fe89bfcac55b3bfdfc869ead5 to your computer and use it in GitHub Desktop.
task :my_custom_heroku_release_phase do
if ENV['DATABASE_URL']
Rake::Task["db:migrate"].invoke
else
$stderr.puts "\n!!! WARNING, no ENV['DATABASE_URL'], not running rake db:migrate as part of heroku release !!!\n\n"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment