Version Controlling Database that is used by multiple projects

强颜欢笑 提交于 2019-12-24 02:25:08

问题


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.

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:

  • Create a new project that is referenced in all solutions that purely contains database scripts
  • Manage the Schema in the main application solution and the views, functions and sprocs in the other solutions (as appropriate) and be very, very careful when I do a build

Any suggestions would be greatly appreciated.

Thanks in advance,

Jason


回答1:


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

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.

Thanks again to pranay for responding.



来源:https://stackoverflow.com/questions/3309350/version-controlling-database-that-is-used-by-multiple-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!