我们的项目有大约20个开发商,但我们的申请相对较少地利用数据库。 我们收集了大约5个数据库,所有这些数据库都非常小,每个数据库的浏览量不到20个,其中没有一个有数百万个或大的。
我们有两种选择:如何长期管理数据库的演变:
- Some kind of tool. Currently we re using Visual Studio database projects, which contain the current definition of the schema, and look at a reference database to generate a diff script. We then use this diff script to bring the reference database up to date.
- Use version scripts to build the database from a baseline. The scripts are manually placed in source control. Any data migration to move data from old columns/tables to new would be part of these scripts. There would be a version recorded in the DB somewhere and upgrading would run all scripts between DB version and the current version.
第二种选择似乎得到广泛使用,我在这里进行了深入讨论:http://odetocode.com/blogs/scott/archive/2008/01/31/versioning-databases-the-baseline.aspx。
The problem we have with what we ve got at the moment is that we don t have access over our Production databases. This means to create a release package, we have to restore a backup of Production into another location, generate a diff against that referece DB and give the script to the production DB team. So our release to production is different to our other environments.
这使得有人呼吁使用版本的文字,因为我们在所有环境中都使用同样的文字,而且在部署时没有临时工作(例如恢复参考行的人工)。 但是,鉴于我们有如此小规模的非行局势,我感到,像我们一样,很难为非行的工具在那里找到一个困难的例子。 我们想要的是尽可能简单易懂的东西。
红色盖特等工具是否对这种假想具有意义,或者我们是否应当使用版本的文字? 这个问题的代价太高,更需要建立一个成功平台,使亚洲开发银行的维持和部署尽可能基本和自动化。