在数据库架构处理的变化 [英] Handling change in a database schema

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

问题描述

我在建立一个应用程序,这将有望在1000年销售的相当初始阶段 - 更有可能这将是数以百计,但无论哪种方式更足以引起良好的中小型头疼的数据库架构更改

我宁愿限制到Windows / .NET / SQL服务器环境作为我们的一些客户会自行托管应用程序,我要建在他们的网络服务器,并安装在自己的服务器从来没有额外的比特进展顺利,并有总是有一些投诉/业务损失结果。所以SQLAlchem​​y的已经出来了,因为它运行在蟒蛇。

我后是一个工具,可以让我轻松的应用程序版本之间迁移。我发现migrator.net和我以前用过的,但从来没有在生产为一体的开发团队似乎每年只工作就可以了,不完全是一个活跃的项目。

什么选择的方法有哪些?

更新 我忘了提,我希望能够利用这个在持续集成环境中,因此,虽然数据花花公子和SQL比较是漂亮的GUI工具,我真的自动化。

解决方案

Red_Gate的SQL比较有利于保持同步两个数据库。

不过,我认为ciritical的是保持在一个特定版本的源代码控制更改。善待你的SQL code就像任何其他的code属于一个版本。不要让你的开发者,使使用GUI的变化,所有的变化应该照本宣科,把源代码控制的部分版本国税发。一旦你这样做,如果有人在版本1和要升级他们version2.3,那么你只需要才能运行sripts的每个版本,你将有一个datbase的2.3版本。

I am in the fairly initial stages of building an app which will hopefully be sold in the 1000's - more likely it'll be hundreds, but either way more than enough to cause a good sized headache for database schema changes.

I'm rather restricted to a windows / .net / sql server environment as a number of our customers will be self hosting the app I'm building in their web servers and extra bits installed on their servers never goes well and there's always a number of complaints / lost business as a result. So sqlalchemy is out, as it runs in python.

What I'm after is a tool that will allow me to easily migrate between versions of the application. I’ve found migrator.net and I’ve used it before, but never in production as the development team appears to only work on it annually, not exactly an active project.

What alternatives approaches are available?

UPDATE I forgot to mention that I want to be able to use this in a continuous integration environment, so whilst data dude and sql compare are nice gui tools, I really automation.

解决方案

Red_Gate's SQl Compare is good for keeping two databases in synch.

However, I think the ciritical thing is to keep your changes in Source Control under a specific version. Treat your sql code just like any other code that belongs to a version. Never allow your devs to make changes using the GUI, All changes should be scripted and put into source control as part ofthe version. Once you do that if someone is in version 1 and you want to upgrade them to version2.3, then you just need to run the sripts for each version in order and you will have a datbase in version 2.3.

这篇关于在数据库架构处理的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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