django - How to use a different database for Heroku review apps? -
i have deployment pipeline on heroku started using review apps. means have app - let's call ci-app -- being created master branch.
every time pull request made, review app created. using django in our project , added migrate
command release
phase in project, database migrations can done automatically.
today, coworker submitted pull request contained database changes. problem migration ran, , since review apps seem using the same database app suppose merge to, migration applied , app ci-app stopped working...since code base no longer matches database structure.
i searched lot how use completely different databases review apps compared parent app, no avail (there resources mentioning how can copy db contents, not need).
any suggestion ?
update
ok, seems heroku create new database review app, however: review app copies of environment variables parent, including database_url (this seems way create review app : https://s3.amazonaws.com/heroku-devcenter-files/article-images/1461071037-initial_set_up_review_apps.png)
i think can black magic in postdeploy script, since database generated url can such heroku_postgresql_{color}_url, not sure how find ....
Comments
Post a Comment