管理数据库更改的最佳方法 [英] The best way to manage database changes

查看:92
本文介绍了管理数据库更改的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

管理数据库更改的最佳方法是什么?我需要有一个解决方案,不管数据库客户端的语言。此外,我想在这些更改中使用特定的数据库功能,例如存储过程,触发器等。

What is the best way to manage database changes? I need to have a solutions regardless the database client's language. Also I'd like to be able to use specific database features in those changes such as stored procedures, triggers and so on.

推荐答案

首先,确保您有整个数据库构建脚本,以便您可以根据需要重建数据库。

First of all, make sure you have your entire Database Build scripted so you can rebuild the database if needed.

每个更改应该写为更新脚本。这样,您可以针对数据库单独运行每个更改。

Each change should then be written as an Update script. That way you can run each change individually against the your databases.

将更改提交到代码库后,将更改脚本与构建过程合并,以便自动完成...然后存档更改脚本以防出现任何问题。

Once the change has been commited to the codebase, merge the change script with the build process so it happens automatically...and then archive the change script in case any questions arise.

这篇关于管理数据库更改的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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