简体   繁体   English

通过TFS用户案例/更改管理模式更改

[英]Manage schema changes by TFS User Story/ Change

we have multiple features that needs to be developed but management decides which features go into Live.. this requires us to have a script for each User Story/Change . 我们有多个功能需要开发,但是管理人员决定将哪些功能引入Live ..这要求我们为每个User Story / Change创建一个脚本。 But how can I link a DB schema change to a User story in TFS? 但是,如何将数据库模式更改链接到TFS中的用户故事?

What we have now: 我们现在所拥有的:

TFS with User Story/Task CC.net Buildserver 带有用户故事/任务CC.net Buildserver的TFS

I've done research for SSDT, looks awesome! 我已经为SSDT做过研究,看起来很棒! but how can i Link this with TFS? 但是我该如何与TFS链接呢?

thanks for reading, 谢谢阅读,

Andy. 安迪

As long as your database scripts (or SSDT projects if you choose to move that direction) are checked into TFS version control, there is a deep connection between changesets and work items . 只要将您的数据库脚本(或您选择向该方向移动的SSDT项目)签入TFS版本控制, changesetswork items之间就存在着深厚的联系。 When looking at your pending changes before checking in code, there is an option to associate a work item (ie a User Story or a Task). 在签入代码之前查看未决的更改时,有一个选项可以关联工作项(即用户案例或任务)。 If you are using Visual Studio 2012, this is what associating a work item would look like: 如果您使用的是Visual Studio 2012,则关联工作项的外观如下所示:

挂起的更改窗口上的相关工作项

And this is what it would look like if you are checking in via Windows Explorer : 这就是通过Windows Explorer签入时的样子:

通过Windows资源管理器签入时关联工作项

There can be a lot of complexity associated with making changes to a system independent of each other. 对彼此独立的系统进行更改可能会带来很多复杂性。 The best solution I've found involves creating "feature toggles" so that you enable or disable a feature after it has been deployed. 我发现最好的解决方案包括创建“功能切换”,以便在功能部署后启用或禁用它。 Take a look at continuous delivery as a topic. 以连续交付为主题。 Jez Humble wrote a great book on the subject. 杰兹·汉布尔(Jez Humble)写了一本很棒的

Database schema changes can be more complex in some cases than just enabling or disabling a feature. 在某些情况下,数据库架构更改可能比仅启用或禁用功能更复杂。 I would suggest using an expand / contract model. 我建议使用扩展/合同模型。 You would add any new structure to the database in advance and get that deployed into production in a non-breaking way. 您将预先向数据库添加任何新结构,然后以不间断的方式将其部署到生产中。 Then when you enable the feature that has a dependency on that structure, it's already there. 然后,当您启用依赖于该结构的功能时,该功能已经存在。 If you need to clean up the database schema after you've removed something then you could do the "contract" cycle out of band with other software changes to reduce the surface area of test. 如果您在删除某些内容后需要清理数据库架构,则可以与其他软件更改一起进行“合同”循环,以减少测试的表面积。

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

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