Setting up a project with a new database in SSMS
Published 15 August 2019
Projects are the primary artifact used when developing and deploying databases using SQL Change Automation. They contain a database's state, and a set of scripts that describe how to get to that state. Learn about SQL Change Automation projects.
This page will help you get started with developing databases using the SQL Change Automation SQL Server Management Studio (SSMS) add-in.
We’ll set up a new SQL Change Automation project which can be deployed against a new database. Specifically, we’ll:
- Create a new SQL Change Automation project within SSMS
- Set up a new development database
- Make changes to the development database, and use SQL Change Automation to generate migrations from the changes
Creating a new project
1. Open SQL Change Automation
In SSMS, start SQL Change Automation by clicking the SQL Change Automation icon in the toolbar. If it doesn't show here, it will be under the Tools drop-down menu.
2. Create a new project
Click New Project… to create a new project. This will open the project setup wizard.
Enter the details for your project. Click the Create new database... link.
Select the server you would like to create your database on and the appropriate connection credentials. Specify a database name, and click OK.
You should now have a development database configured. Click Next to continue setting the project up.
The next page will allow you to specify a SQL Compare filter file for your project. We’re not going to add any filters in this project so click Next.
On the last page of the wizard, you can select a database from which to generate a baseline. Baselines are used when working with an existing database.
We’re going to skip this step, by selecting Don't baseline and clicking Create project.
If you refresh your list of databases in the SSMS Object Explorer, you should see the newly created database you specified in the project setup.
After your project has been set up, you'll be navigated to the Generate migrations page.
When we make changes to our development database, they will show up here.
Next steps
- Commit the SQL Change Automation Project to version control
- Make further development changes and generate migrations for them in the SQL Change Automation project
- Set up a continuous integration pipeline to deploy these changes to another environment (for example, production)