NHibernate 架构更新

发布于 2024-07-22 21:20:32 字数 227 浏览 3 评论 0原文

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

是否有任何工具可以像 SchemaUpdate 一样工作(我可以将工具指向我的实体和数据库的当前版本,并让它生成更改脚本)?

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?

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)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你另情深 2024-07-29 21:20:33

作为一种选择,有一些工具使用 ROR 中的迁移概念。 可能不像您想要的那么容易,但是您可以获得前进/回滚的 Up() 和 Down() 概念。

经过一些调整,我能够让 migratordotnet 为一个小项目工作。

还在这里找到了一篇有用的博客文章: http://benscheirman.com /2008/06/net-database-migration-tool-roundup,虽然它是不久前写的,但希望列出的一些项目自那以后已经取得了进一步的进展。

以下是上述帖子中的列表:

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.

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

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.

Here is the list from the above post:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文