I have a rails elastic beanstalk application with two environments, staging and production. When creating the application and staging environment with eb init i created a database instance. I used the eb console to create the production environment and created a new database instance which i perceive is obviously a wrong move.
How do i make my two environments share the same database instance? If that happens, how about when i update the database migrations in my app and deploy to the staging; it means my users would see it because the same database is used by staging environment.
How to i handle this issue?
I also noticed git aws.push doesn't overwrite my database but it doesn't remove rolled back migrations. Am i missing something?