Question

We are developing a product and we have two branches - main and dev. Dev is work towards next release. Main contains last release and any urgent bug fixes.

Our database is defined in our web.config. We are using EF6 with migrations. We have strategies to deal with migrations in a current branch without that much issue. The problem is switching between branches. If we work on both branches the migrations aren't right for the main branch generally as dev has newer migrations. So we have to roll back our db from dev before starting work in main.

Is there a way in TFS to permanently prevent merging the database connection string between branches so that we can have one DB for production and one DB for dev on our local machines?

Pas de solution correcte

Autres conseils

We have same setup as you and use deployment parameters to change connection strings and other settings. Web.config transforms are another option.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top