开发者

Procedure to keep texts in sync between production and development

开发者 https://www.devze.com 2023-02-14 06:21 出处:网络
We have a production database with texts that shows on our web site. We also have development servers with multiple branches (several copies of the production database).

We have a production database with texts that shows on our web site. We also have development servers with multiple branches (several copies of the production database).

The poblem we have is that during development we add and change texts in each branch. And we also change texts in our production environment.

If development and production has changed the same text it's hard to find our how to merge these changes.

We were thinking of that we only can make changes on the production database and only add texts on development database. But that would give us many many text with different keys that has pret开发者_JAVA百科ty much the same data.

How do you handle text changes between environments?

Thanks!


This is a fairly common problem - Martin Fowler wrote about it a while ago (http://martinfowler.com/articles/evodb.html). THere's no nice, simple, painless solution - but http://www.amazon.com/Recipes-Continuous-Database-Integration-ebook/dp/B000RH0EI4 is probably the best book on the topic....

It's a fairly major undertaking, and requires a lot of discipline from your development team - but it's worth it if you're running into the problems you describe.

It boils down to scripting your database creation/modification tasks, and committing those scripts to source code control. You use a naming convention to determine the order in which to run the scripts, and then have an automated process to run them when setting up an environment, or deploying a new version to that environment.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号