如何将存储过程和其他脚本保存在 SVN/其他存储库中? [英] How to keep Stored Procedures and other scripts in SVN/Other repository?

查看:42
本文介绍了如何将存储过程和其他脚本保存在 SVN/其他存储库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能提供一些真实的例子,说明如何最好地将视图、存储过程和函数的脚本文件保存在 SVN(或其他)存储库中.

Can anyone provide some real examples as to how best to keep script files for views, stored procedures and functions in a SVN (or other) repository.

显然,一种解决方案是将所有不同组件的脚本文件放在一个目录或多个目录中,然后简单地使用 TortoiseSVN 或类似工具将它们保存在 SVN 中,然后每当要进行更改时,我都会将脚本加载到管理工作室等.我真的不想要这个.

Obviously one solution is to have the script files for all the different components in a directory or more somewhere and simply using TortoiseSVN or the like to keep them in SVN, Then whenever a change is to be made I load the script up in Management Studio etc. I don't really want this.

我真正喜欢的是某种可以定期(每晚?)运行的批处理脚本,它可以导出在给定时间范围内发生更改的所有存储过程/视图等,然后将它们提交到 SVN.

What I'd really prefer is some kind of batch script that I can run periodically (nightly?) that would export all the stored procedures / views etc that had changed in a given timeframe and then commit them to SVN.

想法?

推荐答案

在我看来,您似乎不想正确使用修订控制.

Sounds like you're not wanting to use Revision Control properly, to me.

显然,一种解决方案是让所有不同的脚本文件一个或多个目录中的组件某处,只需使用 TortoiseSVN或类似的将它们保存在 SVN 中

Obviously one solution is to have the script files for all the different components in a directory or more somewhere and simply using TortoiseSVN or the like to keep them in SVN

这是应该做的.您将拥有正在处理的本地副本(开发新的、调整旧的等),并且随着单个组件/过程/等完成,您将单独提交它们,直到您必须重新开始该过程.

This is what should be done. You would have your local copy you are working on (Developing new, Tweaking old, etc) and as single components/procedures/etc get finished, you would commit them individually until you have to start the process over.

仅仅因为自上次提交以来已经过了X"次就提交半成品代码是草率的,并且肯定会导致其他使用存储库的人感到悲伤.

Committing half-done code just because it's been 'X' time since it was last committed is sloppy and guaranteed to cause anyone else using the repository grief.

这篇关于如何将存储过程和其他脚本保存在 SVN/其他存储库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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