Generating migrations in SSMS
Published 15 August 2019
SQL Change Automation projects contain a representation of the schema of your development database. Whenever you make a change to your development database, SQL Change Automation can automatically capture those changes. Learn about SQL Change Automation projects.
1. Make a change to the database
In this example we will add a new stored procedure:
CREATE PROCEDURE sprTest AS BEGIN SELECT 1 END
2. Navigate to the Generate migrations page
If you were previously on this screen and the migration does not show, click Refresh.
In this screenshot, we have made other changes to the database, so you can see this change in the context of a larger list of other changes which might be imported.
- You may toggle whether all migrations are selected or de-selected using the check box in the headings
- SQL Change Automation will remember which items you have de-selected over time, even after you close SSMS
3. Optionally, filter the migrations
If you would like to limit the migrations which appear on the screen, type in the "Search object name" bar.
- SQL Change Automation will remember what you have selected prior to applying the filter, and after changing the filter
- You may clear the filter by deleting all text in the "Search object name" bar
- You can keep track of the number of migrations selected by referring to the summary message in the top right region of the screen
4. View the migration differences
Clicking on the script will show the differences between the development database and the SQL Change Automation Project.
5. Generate the migrations
Click the Generate migrations button in the top-right corner. This will capture the changes in the project.
6. View the summary
When the migrations have been generated the summary page will show. You can view and manage all generated scripts by navigating to the Migrations page.
This video shows you how the filter works within this process