Foreign key support in mysql adapter

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

Hi Esad,

You’ll find what you’re looking for here:
http://wiki.rubyonrails.org/rails/pages/Foreign+Key+Schema+Dumper+Plugin

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