• I am using ready-roll for generating the migration script.
  • I have three environments - DEV, UAT and PROD which has one build definition and 3 release definition in VSTS.
  • I don't know what should i include in build definition and release definition for db changes.
  • Db is different for each environment
  • How do i configure the environment variable in build definition as it does not contain Scope?
1

There are 1 best solutions below

0
On

During your build you should generate the migration scripts and copy them to your drop folder. This makes them available for use in your release definition. Build once, deploy many.

During the release you should run these migration scripts against your database and this is where you should have variables like a connectionstring scoped for your environments. Do not forget to mark them as a secret!