如何从命令行更新 SSDT 项目? [英] How to update an SSDT project from the command line?

查看:42
本文介绍了如何从命令行更新 SSDT 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够使用 SSDT(SQL Server Data Tools)将我们的数据库架构置于版本控制之下.在 Visual Studio 中将数据库导入 SSDT 项目会创建数据库架构的良好文本表示,适用于版本控制.

I hope to be able to use SSDT (SQL Server Data Tools) to put our database schema under version control. Importing a database into an SSDT project in Visual Studio creates a nice textual representation of the database schema, suitable for versioning.

现在的问题是,当对数据库架构进行更改时 - 我们如何以编程方式或从命令行更新(或重新导入)SSDT 项目?

Now, the question is, when changes are made to the database schema - how can we programmatically, or from the command line, update (or re-import) the SSDT project?

推荐答案

您可以使用内置的模式比较工具来执行此操作,但您似乎并没有按照 SSDT 数据库项目希望的方式进行开发.它专为离线编辑而设计,这意味着您需要首先编辑项目中的 .sql 文件,然后使用 F5 部署到您的开发数据库进行测试.

You can use the built-in schema compare tool to do this, but it seems that you are not developing the way SSDT database projects want you to. It's designed for offline editing, which means you need to first edit the .sql files in your project, and use F5 to deploy to your dev DB for testing.

如果您希望保持工作联系,您可能想尝试 SQL 变更自动化,我们在 Redgate 提供的一种工具.这有一个一键导入选项,可以自动将数据库更改下拉到您的数据库项目中.

If you'd prefer to keep working connected, you might want to try SQL Change Automation, a tool we offer here at Redgate. This has a one-click import option that automates the pulling down of database changes to your database project.

这篇关于如何从命令行更新 SSDT 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆