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.
1bccbbeadf101f13b1d00a1538ea6b7a?d=identicon&s=25 Esad Hajdarevic (Guest)
on 2006-02-17 17: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
Cf4430b695039e87bb584aa8df99702d?d=identicon&s=25 Simon Pasquier (Guest)
on 2006-02-17 18: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 Hajdarevic 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.