Rails 3 中的 db:auto:migrate
我刚刚将我的应用程序从 Rails 2.3.5 更新到 Rails 3。我最喜欢的插件之一是 Dizzy 的 Auto Migrations: http://www.dizzy.co.uk/ruby_on_rails/contents/auto-migrations
这允许我只需更改架构然后运行 db 即可在数据库中进行更改:自动:迁移。
这个插件似乎无法在 Rails 3 中工作。你们知道如何让它工作吗?或者你们知道我可以使用其他迁移工具来自动将现有(长)模式迁移到新的空数据库中吗?
I have just updated my app from Rails 2.3.5 to Rails 3. One of the plugins I liked most was Auto Migrations by Dizzy: http://www.dizzy.co.uk/ruby_on_rails/contents/auto-migrations
This allowed me to make changes in the database simply by altering the schema then running db:auto:migrate.
This plugin does not seem to be working in Rails 3. Do you guys know either how to get it working or do you know of other migration tools I can use to automatically migrate my existing (long) schema into my new empty database?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以下更新的插件:
自动迁移
try the following updated plugin:
Auto Migrations
您可以使用 hobo 字段,它是 hobo 项目的一部分,不需要整个 hobo 套件
http:// Cookbook.hobocentral.net/manual/hobo_fields
您需要 Rails 3 版本 1.3
You can use hobo fields, a part of the hobo project which doesn't require the whole hobo suite
http://cookbook.hobocentral.net/manual/hobo_fields
You'll want version 1.3 for Rails 3