How do you version your database schema?(你如何版本你的数据库架构?)
问题描述
您如何准备 SQL 增量?您是否手动将每个更改架构的 SQL 保存到一个 delta 文件夹,或者您是否有某种自动比较过程?
How do you prepare your SQL deltas? do you manually save each schema-changing SQL to a delta folder, or do you have some kind of an automated diffing process?
我对版本控制数据库架构和源代码的约定很感兴趣.也许是一个使架构不同的预提交钩子?
I am interested in conventions for versioning database schema along with the source code. Perhaps a pre-commit hook that diffs the schema?
此外,除了 DbDeploy 之外,还有哪些差异增量的选项?
Also, what options for diffing deltas exist aside from DbDeploy?
看到答案我想澄清我熟悉使用增量运行数据库迁移的标准方案.我的问题是关于自己创建增量,最好是自动创建.
seeing the answers I would like to clarify that I am familiar with the standard scheme for running a database migration using deltas. My question is about creating the deltas themselves, preferably automatically.
此外,版本控制适用于 PHP 和 MySQL,如果它有所不同的话.(请不要使用 Ruby 解决方案).
Also, the versioning is for PHP and MySQL if it makes a difference. (No Ruby solutions please).
推荐答案
查看
是否有数据库结构的版本控制系统变化?
如何版本我的 MS SQL 数据库SVN?
和杰夫的文章
让您的数据库处于版本控制之下
我感受到你的痛苦,我希望有一个更好的答案.这可能更接近您要查找的内容.
I feel your pain, and I wish there were a better answer. This might be closer to what you were looking for.
跟踪数据库架构变化的机制
总的来说,我觉得没有足够的、可接受的解决方案来解决这个问题,我在这方面推出了自己的解决方案.
Generally, I feel there is no adequate, accepted solution to this, and I roll my own in this area.
这篇关于你如何版本你的数据库架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:你如何版本你的数据库架构?


基础教程推荐
- SQL Server 2016更改对象所有者 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01