多个项目使用的版本控制数据库 [英] Version Controlling Database that is used by multiple projects

查看:31
本文介绍了多个项目使用的版本控制数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在处理一个包含多个Visual Studio 解决方案"的项目.一个用于主应用程序,另一个是基于组件的项目,将在其他应用程序中重用.

I'm currently working on a project that has several 'Visual Studio Solutions'. One is for the main application and the others are component-based projects which will be reused in other applications.

问题是所有三个解决方案都需要访问来自同一个数据库的数据.每个组件都有自己的一组视图、函数和 sproc,但架构在位置上有所不同(一个组件可能需要另一个组件不需要的字段).

The problem is that all three solutions need to access data from the same database. Each component has its own set of views, functions and sprocs but the schema differs in places (one component may require a field that another component doesn't).

基本上,我不希望一个解决方案因为我对另一个解决方案所做的更改而中断.

Basically, I don't want to have one solution break because of a change that I've made in another one.

在我看来,我有两个选择:

The way I see it I have two options:

  • 创建一个在所有纯粹包含数据库脚本的解决方案中引用的新项目
  • 管理主应用程序解决方案中的架构以及其他解决方案中的视图、函数和 sproc(视情况而定),并且在我进行构建时要非常非常小心

任何建议将不胜感激.

提前致谢,

杰森

推荐答案

只是想我会在这里发布我的解决方案,以防其他人遇到同样的问题...

Just thought I'd post my solution here just in case anyone else comes across the same problem...

我最后选择了选项一.我创建了一个新的数据库项目,在所有 3 个解决方案中都引用了该项目.不是世界上最漂亮的解决方案,但它有效.

I went with option one in the end. I created a new Database Project which is referenced in all 3 solutions. Not the prettiest solution in the world, but it works.

再次感谢 pranay 的回复.

Thanks again to pranay for responding.

这篇关于多个项目使用的版本控制数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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