1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Do Heroku staging apps share database with review apps?

Discussion in 'Programming/Internet' started by AdColvin, Sep 12, 2018.

Tags: Add Tags
  1. AdColvin

    AdColvin Guest

    I've noticed some odd behaviour when working with review apps. I created a review app for a pull request I was working on. It's parent was my staging app. As part of the pull request I migrated the database many times and I was testing those migrations with the review app. I'm working with Rails.

    I was preparing to merge my changes and deploy to the staging app, but I noticed that the data in my staging app had changed. There have been no deploys to staging since I started this work.

    For example, in staging I have a QrCode model, and that model has a user_id. With my review app, I migrated the database to drop the user_id column and create a new Product model that has a user_id instead. Now in my staging app, the user_id column has been dropped from QrCode but the new Product model isn't there. It's as if the existing tables in the database have been updated to the new schema, without the new ones being added.

    Has anyone else experienced a similar issue, or know what might be going on? I need to know that all migrations work correctly before deploying to production.

    Login To add answer/comment

Share This Page