Migrations spreading to the wrong database (local environment)
1
vote
0
answers
46
views
I am working on one Flask project and one Ruby on Rails project, both using Postgres. When I migrate in Rails, the changes are implemented both in this database and in the database for the Flask project, which of course is very undesirable. My first idea was to use a different port for the Flask project, however now I realized that it needs to be set in postgresql.conf and thus will be changed for everything I run locally. Why are these databases being intertwined and how can I stop this from happening?
I am using Postgres 12, Flask 1.1.2, Alembic 1.7.6, Rails 6. For the Rails app I have one test and one development database, for the Flask app just one. When I look at my list of databases, it seems as if two have been added for this one (Flask), with -0 and -1 as suffixes. Both of these also have the tables from the Rails app.
From database.yml in the Rails app (this is the correct name):
development:
<<: *default
database: birdspotting_development
Asked by пaean
(11 rep)
Apr 23, 2022, 09:39 PM
Last activity: Apr 24, 2022, 09:27 AM
Last activity: Apr 24, 2022, 09:27 AM