Forum: Ruby on Rails foreign key support in mysql adapter

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Esad H. (Guest)
on 2006-02-17 18:09

I'm using Migration to define my database schema and these "ALTER TABLE
t ADD FOREIGN KEY..." look really ugly - that's why I wanted to ask it
would be possible to simply add add_foreign_key method to ActiveRecord?
Are there any reasons this isn't yet implemented?


Simon P. (Guest)
on 2006-02-17 19:24
(Received via mailing list)
Hi Esad,

You'll find what you're looking for here:

Unzip the file in the vendor/plugins directory of your Rails application
and you're done.



Esad H. wrote:

Quiconnect <>
Tel: +33 4 56 58 61 02
Skype Name: simonpasquier
This message may contain privileged or confidential information
This topic is locked and can not be replied to.