Forum: Ruby on Rails add_index problems

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
28c315da59bc0bc0a544ed4a75ad26e9?d=identicon&s=25 Pierre-Alexandre Meyer (Guest)
on 2007-04-09 15:08
(Received via mailing list)
Hi all,

I think there's a bug in rake db:schema:dump.

Try to add in your migration
execute 'ALTER TABLE posts ADD UNIQUE (description(15))'

and rake db:schema:load : it just converts it to
add_index "posts", ["description"], :name => "description", :unique =>

The point is that MySQL will crash when you'll try rake your tests.
Assuming description is a 'text', you need to specify length of the

Am I wrong? Does someone can reproduce the bug?

| Pierre-Alexandre Meyer |
| email : |
This topic is locked and can not be replied to.