Forum: Ruby on Rails foreign key support in mysql adapter

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

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?

Greetings,

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

You'll find what you're looking for here:
http://wiki.rubyonrails.org/rails/pages/Foreign+Ke...

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

Cheers,

Simon

Esad H. wrote:
>
>

--
Simon PASQUIER
Quiconnect <http://www.quiconnect.com>
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.