NHibernate SchemaUpdate [英] NHibernate SchemaUpdate

查看:59
本文介绍了NHibernate SchemaUpdate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从个人经验以及我读过的所有内容来看,NHibernate的SchemaUpdate不支持删除列和表.我想使用SchemaUpdate生成迁移DDL,但没有删除操作会使其更加困难.您如何解决这个问题?在进行影响数据库的更改时,是否还有其他工具可以帮助您将精力集中在域层上?

From personal experience, as well as everything I've read, NHibernate's SchemaUpdate doesn't support removing columns and tables. I'd like to use SchemaUpdate to generate migration DDL, but not having the deletes is making it more difficult. How do you get around this? Are there other tools that would help to keep the focus on the domain layer when making changes that affect the database?

有没有像SchemaUpdate这样的工具(我可以在其中将工具指向我的实体和数据库的当前版本,并让它生成更改脚本)?

Are there any tools out there that work like SchemaUpdate (where I could point the tool to my entities and current version of the database, and have it generate the change scripts)?

推荐答案

作为一种选择,有些工具使用了

As one option, there are a few tools that use the Migration concept from ROR. Probably not as easy as you'd like, but you get the Up() and Down() concept for going forward / rolling back.

通过一些调整,我得以使 migratordotnet 可以用于一个小型项目

With a few tweaks I was able to get migratordotnet to work for a small project.

还在这里找到了有用的博客文章: http://benscheirman.com/2008/06/net-database-migration-tool-roundup ,尽管它是前一段时间写的,但希望其中列出的一些项目能在此之后走得更远.

Also found a useful blog post here: http://benscheirman.com/2008/06/net-database-migration-tool-roundup, although it was written a while ago, hopefully some of the projects listed have come further since.

这是上面帖子的列表:

  • Migrator.NET
  • RikMigrations
  • Tarantino
  • Machine Migrations
  • Subsonic Migrations
  • dbDeploy.NET

这篇关于NHibernate SchemaUpdate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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