TFS 和数据库项目 (SQL Server) [英] TFS and DATABASE PROJECTS (SQL Server)

查看:36
本文介绍了TFS 和数据库项目 (SQL Server)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最初拒绝将数据库项目与 TFS 结合使用作为我们部署和源控制需求的解决方案.但是,为了彻底起见,我正在对其进行探索和原型设计.

We originally dismissed using database projects in conjunction with TFS as our solution for our deployment and soucecontrol needs. However, in the interest of thoroughness, I'm exploring and prototyping it.

我已经设置了我的数据库项目(选中了添加到源代码管理).我已经检查了更改.现在,你从哪里发展?我试过了……

I've set up my database project (with add to source control checked). I've checked in the changes. Now, where do you develop from? I've tried ...

  1. 连接到远程开发服务器以进行更改
  2. 将架构同步到 (localdb)\Projects 并在那里进行更改
  3. 直接在源代码管理资源管理器
  1. connecting to the remote development server to make changes
  2. syncing schema to (localdb)\Projects and making changes there
  3. directly in the Source Control Explorer

对于选项 1 和 2,我没有看到将代码添加到源代码管理的自动化方法.我是否应该在源代码管理资源管理器中工作?(这似乎有点傻)...有没有办法将整个解决方案提交给源代码管理?提前道歉,我是一名数据库开发人员,这个解决方案"的概念对我来说非常陌生.

With option 1 and 2 I don't see an automated way to add code to source control. Am I suppose to be working in the Source Control Explorer? (this seems a little silly)... Is there a way to commit the entire solution to source control? My apologies in advance, I'm a database developer and this concept of a "solution" is very foreign to me.

还有很多关于 Visual Studios 在后台做了很多丑陋的事情的传言,这使得很多开发商店都关闭了数据库项目.有人可以与我分享您的经验吗?一些陷阱和陷阱.

Also there were a lot of chatter about Visual Studios doing a lot of ugly things in the back ground that turned a lot of development shops off of database projects. Can someone share your experiences with me? Some of the pitfalls and gotchas.

是的,我们已经看过 Redgate SourceControl(非常好的工具).

And yes, we have looked at Redgate SourceControl (very nice tool).

推荐答案

通常人们会做以下两件事之一:

Generally people do one of two things:

  1. 通过解决方案资源管理器在 Visual Studio 中进行开发.只需像打开任何其他项目一样打开项目,添加表、索引等.您甚至可以获得与在 SSMS 中相同的用于编辑 DB 对象的 GUI.所有更改都将自动添加到 TFS 待定更改(就像任何其他代码更改一样),并且可以在您准备好后签入.

  1. Develop in Visual Studio, via the Solution Explorer. Just open the project like you would any other project, add tables, indexes, etc. You even get the same GUI for editing DB objects as you get in SSMS. All changes will automatically be added to TFS Pending changes (just like any other code change), and can be checked in when you're ready.

将最新的数据库(使用 VS 中的发布)部署到任何 SQL Server,在 SSMS 中进行更改,然后在 Visual Studio 中进行架构比较以将更改带回您的数据库项目,以便将它们签入TFS.

Deploy the latest DB (using Publish in VS) to any SQL Server, make your changes in SSMS, then do a Schema Compare in Visual Studio to bring your changes back into your DB project so they can be checked into TFS.

我使用 DB 项目已经很多年了,我喜欢它们!从那时起,我介绍给他们的每个开发人员都拒绝在没有他们的情况下进行开发.

I've been using DB projects for many years and I LOVE them! Every developer I've introduced them to, refuses to develop without them from that point on.

这篇关于TFS 和数据库项目 (SQL Server)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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