Generating migrations
Published 13 August 2019
SQL Change Automation allows you make changes to your development database whilst you develop features and improvements. When you are happy with your changes you can capture them as a migration script by using the generate migrations workflow. You can share the migrations with the rest of your team and deploy them to other environments.
When generating migrations the objects in your database will be split into migration scripts and programmable objects.
You can also add migrations manually and write your own scripts to change your databases. If you take this approach you will need to apply your changes to the development database.
Configuration
You can control which database objects will be captured by using filters and changing comparison options.
Editing or deleting generated migrations
After a migration has been generated, it can be safely edited or deleted, provided it has not been committed to version control or deployed to a shared environment.
If you edit a migration, refresh the list of differences between your project and your development database to ensure that the edit has not introduced a schema change.
Undoing/reverting changes to the development database
When choosing whether to automatically import changes into a migration, there is also the option to revert (in Visual Studio) or undo (in SSMS) the changes to the development database.
This can be particularly useful after editing a migration script or switching branch.