如何维护数据库结构的版本控制? [英] How do you maintain revision control of your database structure?

查看:430
本文介绍了如何维护数据库结构的版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是跟踪项目数据库结构更改的最简单方法?

What is the simplest way of keeping track of changes to a projects database structure?

当我更改数据库的某些内容时(例如,添加一个新表,一个新的字段到现有的表,添加一个索引等),我想要传播到团队的其余部分,最终传播到生产服务器,以最小的努力和努力。

When I change something about the database (eg, add a new table, add a new field to an existing table, add an index etc), I want that to be propagated to the rest of the team, and ultimately the production server, with the minimal fuss and effort.

目前,解决方案相当弱,依靠人们记住做事情,这是一个意外等待发生。

At the moment, the solution is pretty weak and relies of people remembering to do things, which is an accident waiting to happen.

使用标准版本控制软件(在我们的案例中为Perforce)。

Everything else is managed with standard revision control software (Perforce in our case).

我们使用MySQL,所以理解这些工具是有帮助的,虽然我也有兴趣了解其他

We use MySQL, so tools that understand that would be helpful, though I would also be interested to learn how other places are handling this anyway, regardless of database engine.

推荐答案

您可以转储模式并提交它 - RCS将照顾版本之间的更改。

You can dump the schema and commit it -- and the RCS will take care of the changes between versions.

这篇关于如何维护数据库结构的版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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