Pavan Kulkarni
2009-Aug-27 23:14 UTC
mbleigh / acts-as-taggable-on migration error for MySQL
Hi, I installed acts-as-taggable-on plugin and generated acts_as_taggable_on_migration (Mac OS X, Rails 2.3.3, MySQL). The migration generated has t.column :taggable_id, :integer t.column :tagger_id, :integer MySQL complains when rails tries create FOREIGN KEY (taggable_id) REFERENCES taggables (id) and FOREIGN KEY (tagger_id) REFERENCES taggers (id). Mysql::Error: Can''t create table ''fastpencil_development.taggings'' (errno: 150): CREATE TABLE `taggings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `tag_id` int(11), `taggable_id` int(11), `tagger_id` int(11), `tagger_type` varchar(255), `taggable_type` varchar(255), `context` varchar(255), `created_at` datetime, FOREIGN KEY (tag_id) REFERENCES tags (id), FOREIGN KEY (taggable_id) REFERENCES taggables (id), FOREIGN KEY (tagger_id) REFERENCES taggers (id)) ENGINE=InnoDB Adding :references => nil should fix this, but is that the solution? Has anyone see this error before? Thanks in advance. -Pavan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---