Oracle DB 版本控制方案

发布于 2024-08-17 10:37:22 字数 206 浏览 8 评论 0原文

只是想知道是否有人曾经想过/实现过这样的事情。

我正在考虑实施数据库版本控制方案。每天运行一次作业,将所有 DDL 和源代码输出到单个文件中。然后将针对该文件运行哈希。哈希值将与版本号一起存储在数据库中。每当哈希值发生变化时,哈希值都会更新,版本号也会增加。

这有道理吗?除了每天发生一次之外,有人看到其中有什么巨大的漏洞吗?

有人做过类似的事情吗?

Just wondering if anyone has ever thought of/implemented something like this.

I'm considering implementing a DB versioning scheme. Once per day, a job would run, which outputs all DDL and source code into a single file. A hash would then be run against that file. The hash would be stored in the DB with a version number. Anytime the hash changed, the hash value would be updated and the version number incremented.

Does that make sense? Anyone see any huge holes in that other than the fact it would happen once per day?

Anyone done something similar?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

乄_柒ぐ汐 2024-08-24 10:37:22

这是某个随意的人关于该主题的博客文章。他链接到一些好文章来提供想法。

将您的数据库置于版本控制之下

Here's a blog post by some random guy about the subject. He links to a few good articles to give ideas.

Get Your Database Under Version Control

江南烟雨〆相思醉 2024-08-24 10:37:22

另一种方法可能是编写增量更改的脚本,以便这些脚本的总和代表您当前的版本。优点是 - 特别是如果您在团队中进行开发 - 各个脚本可以在提交到存储库之前在本地实例上进行测试。

如果更改很多且频繁,我会使用一系列增量脚本,如果数据库代码已达到一定程度的稳定性,我会使用您的方法。

Another approach could be to script your incremental changes so that the sum of these scripts represents your current version. The advantage is that - especially if you are developing in a team - the individual scripts can be tested on a local instance before being committed to the repository.

I'd use a series of incremental scripts if the changes are many and frequent, and your approach if the database code has reached a certain level of stability.

陌若浮生 2024-08-24 10:37:22

不确定您认为此用途有何用途。我倾向于使用 AUDIT 和/或 DDL 触发器来捕获数据库中的代码更改。

我不会用它来代替适当的源代码控制版本控制,尽管如果它不存在并且您无力将其到位,那么它可能比没有好。

一种想法是,有时参考数据与代码一样重要。

Not sure what you see as the use for this. I'd tend towards AUDIT and/or DDL triggers to capture code changes in the database.

I wouldn't use this in place of a proper source code control versioning, though it may be better than nothing if that doesn't exist and you are powerless to put it in place.

One thought is that sometimes reference data is as important as code.

救星 2024-08-24 10:37:22

与工作区管理器类似的东西用于版本控制数据:

http:// /www.oracle.com/technology/products/database/workspace_manager/index.html

Something along the lines of Workspace Manager although is for versioning data:

http://www.oracle.com/technology/products/database/workspace_manager/index.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文