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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs