I have four different databases in my Symfony project. Locally those databases have their individual names so in the migrations one can tell them apart. I have prefixed each table with db_name.table in each migration so that the correct database is migrated.
Now I want to set this up on a remote where the database names are auto generated (using flynn.io), but the database names are fixed in all the migrations... Is there a way to read the db names from environment variables or some similar solution?
You can use DoctrineMigrationsBundle
See, If this somehow satisfied your need, you just need to find DB Names and embeded in paramters.yml file.