如何同步开发和生产数据库

编程入门 行业动态 更新时间:2024-10-28 06:28:04
本文介绍了如何同步开发和生产数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您知道任何应用程序可以同步两个数据库吗?在开发过程中,有时需要添加一个或两个表行或新的表或列. 通常,我将每个sql语句写在某个文件中,并且在上载路径期间,将这些行移出生产数据库中(之前对其进行备份). 我使用mySQL和postreSQL数据库.

Do you know any applications to synchronize two databases - during development sometimes it's required to add one or two table rows or new table or column. Usually I write every sql statement in some file and during uploading path I evecute those lines on my production database (earlier backing it up). I work with mySQL and postreSQL databases.

您的做法是什么,哪些应用程序可以帮助您.

What is your practise and what applications helps you in that.

推荐答案

您要求提供工具或应用程序答案,但真正需要的是过程答案.这里的基本主题是,您应该对数据库DDL(和DML,如有需要)进行版本控制,并提供更改脚本,以便能够将数据库的任何版本更新为更高版本.

You asked for a tool or application answer, but what you really need is a a process answer. The underlying theme here is that you should be versioning your database DDL (and DML, when needed) and providing change scripts to be able to update any version of your database to a higher version.

由Jeff Atwood提供并由K.Scott Allen编写的这组链接详细说明了它的外观-它们比我在这里可能写的要好得多: www.codinghorror/blog/2008/02/get- your-database-under-version-control.html

This set of links provided by Jeff Atwood and written by K. Scott Allen explain in detail what this ought to look like - and they do it better than I can possibly write up here: www.codinghorror/blog/2008/02/get-your-database-under-version-control.html

更多推荐

如何同步开发和生产数据库

本文发布于:2023-10-24 09:06:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1523525.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!