March 23rd, 2026
0 reactions

Manage SQL database schemas in VS Code: Publish dialog and item templates

Making schema changes often means jumping between tools. You write code in VS Code, then switch to a separate tool to deploy your changes : exporting a script, running it manually, or copy-pasting into a query editor. Either way, it pulls you out of your flow.

With the latest updates to SQL Database Projects in VS Code, that context switching is no longer necessary. You can now manage and deploy schema changes to Azure SQL, SQL Server, or Fabric SQL databases without leaving your editor.

What’s new: Publish dialog and item templates

We’ve added two features to the SQL Database Projects extension for VS Code that make database development faster and less error-prone.

1. Publish dialog: See what you are deploying before you deploy it

When you right-click your SQL database project and select Publish, you get a dialog that lets you:

  • Browse and select your target database — no more copying connection strings or searching for server names
  • Preview the deployment script — see exactly what SQL will run before you commit
  • Configure deployment options — control behavior like whether to drop objects that don’t exist in your project

This is especially valuable when deploying to production or making changes that could affect existing data. You can review the exact T-SQL that will be executed, verify it’s doing what you expect, and deploy with confidence.

2. Item templates: Get started faster

Item templates generate pre-configured code for tables, stored procedures, views, and other database objects with structure that matches your team’s standards. No more copy-pasting from old projects or remembering syntax.

  • Select your project
  • Select Add Item
  • Choose your template (table, view, stored procedure, function)
  • Get a properly formatted file ready to customize

Copilot code completions and Copilot agent in VS Code are also ready to assist you in completing the database objects. Hint: Tell Copilot agent “I’m creating a Microsoft.Build.Sql project and need <complex set of objects>.” If your team has naming conventions, security patterns, or audit columns that should be on every table, templates provide a consistent starting point.

Why this matters: Your database workflow should feel like app development

If you are building an application, your workflow probably looks like this: write code in VS Code, commit to Git, deploy via CI/CD pipeline. You don’t switch between tools for every step. You stay in your editor, and the deployment happens from there.

Database development has traditionally been different. You write schema changes in one tool, deploy them in another, and manage source control somewhere else entirely. That fragmentation slows you down and creates opportunities for mistakes.

With SQL Database Projects in VS Code, your database workflow can match your application workflow:

  1. Write schema changes in SQL files in your project
  2. Version control them in Git
  3. Review them in pull requests with your team
  4. Deploy them directly from VS Code using the publish dialog

All without leaving your editor. All with the same version control and review processes you use for application code.

Real-world scenarios

  • Test locally first: Deploy to a local SQL Server 2025 container before pushing to production using the ‘allow incompatible platform’ option
  • Enforce team standards: Use item templates to ensure consistent structure (like required audit columns) across all new database objects
  • Review before production: Preview the exact T-SQL that will be executed, and confirm it before you deploy

Get started

Both the publish dialog and item templates are available now in the latest SQL Database Projects extension for VS Code.

For detailed guidance, refer to the Publish dialog documentation and Item templates documentation.

What’s coming next

The publish dialog and item templates are just the beginning. Over the coming months, we’re investing in making VS Code the best place to build and manage SQL databases:

  • Code analysis and quality checks
  • Advanced IntelliSense and productivity features
  • Deeper integration with AI-assisted development

The roadmaps for the MSSQL extension in VS Code and SQL projects are available on GitHub: vscode-mssql roadmap and DacFx roadmap.

Author

0 comments