开发者

Installing the foreign_key_migrations plugin

I apologize if this is a dumb question but I've had a long week and this is just more than my feeble brain can handle at this point.

I'm trying to install the foreign_key_migrations plugin for Rails, which can be found here: https://github.com/harukizaemon/redhillonrails/tree/master/foreign_key_migrations/

How do I install the plugin? The README files I read aft开发者_如何学Pythoner cloning the Git repository don't seem to offer any installation instructions. I don't get it.


Never heard of the plugin and sure looks useful. I might try it out some time. As for your question: do you mean how to get the plugin inside your /vendor/plugins folder? If so, that's quite simple:

script/plugin install https://github.com/harukizaemon/redhillonrails.git

When it's installed, you just need to add a foreign key via a migration, and the plugin does everything automatically it seems. To add the foreign keys on an existing database, just do the following:

script/generate foreign_key_migration

Hope it helps.

EDIT

When using Rails 3, you should do:

rails plugin install https://github.com/harukizaemon/redhillonrails.git

But I don't know if this plugin works with Rails 3.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜