Skip to content

SQL Server 2025: Local SQL Server Container – Schema design preview

After my blogs about “SQL Server 2025: Local SQL Server Container without Docker Command” and “SQL Server 2025: Local SQL Server Container – Schema compare preview”, I continue to play & test it.

One new feature in preview is the “Schema Design compare” in this last MSSQL extension for Visual Studio Code:

Let’s start and see on a database (db2 in my example):

Et voila, I have my 2 tables created during the test on Schema Compare blog here

Now, I create a new table t3 with some columns:

Questions about your own setup? A dbi services consultant can look at your case.

Talk to an expert (opens in a new tab)

Very easy to create a table without being a SQL Expert.

As you can see, you have easily access to the option and add some specific input like the size or a default value.

The table t3 is created with a primary key on column c1.

Now, I change my table t2 and want to put c1 as primary key.

To edit the table t2, just click on the pen:

In the edit table, I just check the column c1 as primary key:

And I have my primary key on table t2:

Now, I want do link between my 3 tables (this is named/known as a Foreign Key…)

First between t2 and t3, I go the side of the table t2 and a blue point appears. Take it and go to the table t3

Let’s try between the table t2 and the table t1

Aie! Error message:

  • Failed to create a foreign key
  • Column ‘c1’ must be a primary key

It’s very good to have this control and information.

This will help a lot of developers…

I will not continue more with the design.
It’s already and really a good tool to design our schema.

One good point is the export button to have the schema design as a picture with 3 formats possibilities svg ,png or jpeg.

No excuse to not do a documentation! 😉

The definition button gives you the design script:

The last button to use is the Publish Changes:

I wait a little bit, and I have the resume of the design change:

I like the checkbox “I have read the summary and understand the potential risks” and I publish.

It’s just a discovery about the Schema design preview.

It will be a good help for developers.

See you soon for the next episode! 😉

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Stéphane Haby

Stéphane Haby

Stéphane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.View Author posts

182 posts since April 2011

Most read in Docker

The Docker posts our readers open most: the all-time favourites, and what is trending right now.

Leave a Comment

Your email address will not be published. Required fields are marked *