简体   繁体   English

如何使用RedGate,TeamCity和SVN自动升级数据库

[英]How can I automatically upgrade databases with RedGate, TeamCity and SVN

We are looking to move from manual scripts to the RedGate database source control to manage our databases. 我们希望从手动脚本转移到RedGate数据库源代码控制来管理我们的数据库。

We want to make changes to stored procs/lookups etc and then just check them into to the SVN trunk which will fire a new TeamCity build. 我们想要对存储过程/查找等进行更改,然后将它们检入SVN主干,这将触发新的TeamCity构建。 I've looked at the RedGate docs and some google results (eg http://www.troyhunt.com ) and they appear to diff the schema which should be ok. 我查看了RedGate文档和一些谷歌搜索结果(例如http://www.troyhunt.com ),他们似乎区分了应该没问题的架构。 The issue is the look up tables. 问题是查找表。

We have listed what tables are lookup/static tables (in SQL studio) but how can I get that list to the SQL Data compare tool (I guess I could look at the files in the Data folder)? 我们已经列出了哪些表是查找/静态表(在SQL工作室中)但是如何将该列表提供给SQL数据比较工具(我想我可以查看Data文件夹中的文件)? Also, How would we go about updating existing data, eg upper case all surnames? 另外,我们如何更新现有数据,例如大写所有姓氏?

The other two bits of fun are we have multiple clients using the same database schema but some might be on version 0.3 and some on 0.4. 另外两个有趣的是我们有多个客户端使用相同的数据库模式,但有些可能是版本0.3,有些可能是0.4。 I'm guessing we will need to change the source control binding in SQL when we want to work on a older version (eg for a bug fix to live) 我猜想当我们想要处理旧版本时,我们需要在SQL中更改源代码控制绑定(例如,修复bug)

Does anyone else perform continous deployments with multiple versions of databases? 是否有其他人使用多个版本的数据库执行连续部署?
Thanks 谢谢

应该可以为trunk和每个分支创建一个TeamCity构建,并与SQL Compare命令行和SQL Data Compare命令行集成。

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

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