.NET 中的运行时数据库迁移(存在吗?)
有很多关于 .NET 中类似 Rails 的数据库迁移的帖子,但它们似乎都没有做我希望它们做的事情。
我有一个 WPF 项目,我们使用 Prism 来创建可加载模块。我想做的是允许模块在加载时将数据库迁移移交给核心,其中包含迁移和任何种子数据。如果该迁移已经存在,它会忽略它,否则它会迁移(或更新,如果有新版本 - 不确定如何工作)
似乎所有系统都在使用 NAnt 或 MSBuild,我想知道是否有一个框架用于运行时迁移。如果没有,有没有人在其他地方看到过这样的运行时数据库操作来模拟?好的方向或想法?
There are a lot of post about rails-like database migrations in .NET, but none of them seem to do what I want them to do.
I have a WPF project and we're using Prism to create loadable modules. What I'd like to do is allow the module to hand off a database migration to the core at load time, with migration and any seed data. If that migration already exists, it ignores it, otherwise it migrates (or updates if a new version- not sure how to work that)
It seems like all of the systems are using NAnt or MSBuild and I wondered if there was a framework out there for runtime migrations. If not, has anyone seen such runtime database manipulation elsewhere to emulate? Good directions or ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的意思是像 FluentMigrator 之类的东西?
经过更多搜索,我发现了这个问题:
https://stackoverflow.com/q/8033/50079
其中有更有价值的答案。也看一下。
You mean something like FluentMigrator?
After more searching, I found this question:
https://stackoverflow.com/q/8033/50079
which has more valuable answers. Have a look at it as well.