管理的破数据库更改迁移到由旧版本的同一应用程序共享的数据库 [英] Managing the migration of breaking database changes to a database shared by old version of the same application

查看:130
本文介绍了管理的破数据库更改迁移到由旧版本的同一应用程序共享的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标之一是要能够部署并排运行侧的旧版本的web应用程序的新版本。美中不足的是,一切都共用一个数据库。在新的版本趋于数据库包括显著重构到数据库表。我想是卷展栏中的应用程序对用户的新版本随着时间的推移,并能切换回旧版本,如果我需要。

One of my goals is to be able to deploy a new version of a web application that runs side by side the old version. The catch is that everything shares a database. A database that in the new version tends to include significant refactoring to database tables. I would like to be rollout the new version of the application to users over time and to be able to switch them back to the old version if I need to.

奥伦有一个很好的<一个href=\"http://ayende.com/Blog/archive/2007/11/24/A-vision-of-enterprise-platform-Hot-amp-Distributed-Deployment.aspx\"相对=nofollow称号=企业平台的愿景:热&放大器;分布式部署>帖子设立的问题,但它结束了:

Oren had a good post setting up the issue, but it ended with:

我们仍然在一定程度浑水与问候部署到生产的问候影响整个系统,以机智的变化,打破了数据库的变化。我将讨论,在接下来的文章中,这其中有只是一个点点伸出手,我很害怕。

"We are still in somewhat muddy water with regards to deploying to production with regards to changes that affects the entire system, to wit, breaking database changes. I am going to discuss that in the next installment, this one got just a tad out of hand, I am afraid."

在后续的后没有来;-)。你会如何​​去突破管理数据库变更由旧版本的同一应用程序共享的数据库的迁移。你将如何保持数据同步呢?

The follow-on post never came ;-). How would you go about managing the migration of breaking database changes to a database shared by old version of the same application. How would you keep the data synced up?

推荐答案

如果旧版本必须保持,这些变化根本无法突破。部署Web应用程序的新版本时,这也可以帮助 - 如果你需要回滚,它的真正的帮助,如果您可以将数据库,因为它是

If the old version has to be maintained, the changes simply can't be breaking. That also helps when deploying a new version of a web app - if you need to roll back, it really helps if you can leave the database as it is.

这显然带有显著的建筑障碍,你几乎肯定会落得这表明其血统的数据库,可以这么说 - 但部署的好处通常是值得的头痛,在我的经验

Obviously this comes with significant architectural handicaps, and you will almost certainly end up with a database which shows its lineage, so to speak - but the deployment benefits are usually worth the headaches, in my experience.

它帮助,如果您有集成测试所涉及的每个旧版本了坚实的集合。你应该能够对迁移的测试数据库运行它们每它仍然被认为是可能生活的版本 - 这很可能是在某些情况下,每一个版本的不断。如果你能控制的部署合理严格可能逃脱只有具有三个或四个版本的兼容性 - 在这种情况下,你可以计划淘汰落后表/列等是否有一个真正的需要。只要记住了针对累积的好处,比如规划的复杂性。

It helps if you have a solid collection of integration tests for each old version involved . You should be able to run them against your migrated test database for every version which is still deemed to be "possibly live" - which may well be "every version ever" in some cases. If you're able to control deployment reasonably strictly you may get away with only having compatibility for three or four versions - in which case you can plan phasing out obsolete tables/columns etc if there's a real need. Just bear in mind the complexity of such planning against the benefits accrued.

这篇关于管理的破数据库更改迁移到由旧版本的同一应用程序共享的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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