简体   繁体   English

Visual Studio数据库项目+部署+ TFS构建+多租户

[英]Visual Studio Database Project + Deploy + TFS Build + Multi Tenancy

We have recently migrated to using the Visual Studio database projects. 我们最近已经迁移到使用Visual Studio数据库项目。 What we want to do is for the database to deploy when the TFS build server builds. 我们要做的是在TFS构建服务器构建时部署数据库。

This is relatively simple and we have this working for a single database, however, what we need is for it to deploy to multiple database as we have a SaaS product with multiple databases. 这是相对简单的,我们可以在单个数据库中使用它,但是,由于我们拥有一个具有多个数据库的SaaS产品,因此我们需要将其部署到多个数据库中。 So for example, when we do a QA build, all the different databases with various configurations on the QA DB server should be updated. 因此,例如,当我们进行QA构建时,应更新QA DB服务器上具有各种配置的所有不同数据库。

Is there a 'proper' way to do this? 是否有“适当”的方式来做到这一点?

Our current plan is to take the deployment .sql script that will be generated from the database configured for deployment, then create a custom build task which runs this script against the rest of the databases. 我们当前的计划是采用将从配置用于部署的数据库中生成的部署.sql脚本,然后创建一个自定义构建任务,该任务将针对其余数据库运行该脚本。

我认为没有标准的方法可以执行此操作,因此我们创建了一个自定义构建任务,该任务在要部署的数据库上进行迭代,以执行由标准数据库项目的部署针对每个DB生成的部署脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM