Hello,
I''m trying to do a ALTER TABLE to add a foreign key. The code is:
execute "ALTER TABLE table1
ADD CONSTRAINT FOREIGN KEY
`const_fk_table1_table2_id` (`table2_id`)
REFERENCES `table2` (`id`)
ON DELETE CASCADE"
Instead of creating a foreign key constraint with the name
"const_fk_table1_table2_id" it will create one with the name
"table2_ibfk_1".
First I''ve added an index with : add_index :table1, :table2_id, :name
=> ''fk_table1_table2_id''
Am I doing something wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---