Heroku deploy migration error
benichu opened this issue · 6 comments
PG::NotNullViolation: ERROR: column "location_id" contains null values
Source: https://travis-ci.org/montrealrb/Montreal.rb/builds/96755199#L641
I am surprised to see that there are locations already in prod db. Couldn't we just delete them and run the migrations again?
I think it was a old admin test... I'll take care of it tonight and redeploy...
My biggest problem is that I found out about the migration error by randomly drilling down travis-ci log...
Also related to this #140 - travis/heroku
Maybe TravisCI is configured to only notify Slack when "all is well", and do nothing if the deploy failed?
As for the issue at hand, removing all location rows from db should fix it.
removes the event with a nil location, ran migration, all is good.
I am still not very confident about the travis-ci + heroku deploy process, maybe my expectations are wrong:
- merge code to master
- build pass at Travis
- code is deployed to heroku, migrations run if any
- if any of the deploy tasks fail, keep the previous application release, and notify admins
Not this:
Anyway closing that issue for now...
Thanks for the screenshot. Indeed, it does not look like a failure.
And as you said, the deploy process is currently not optimal.