If you used MySQL FULLTEXT indexes and just upgraded to Rails 1.1, watch out for this one. Rails 1.1 now defaults to Ruby as your schema format. So instead of development-structure.sql, Rake will use schema.rb. That's portable and good stuff overall but there is a slight compatibility issue. Ruby schema doesn't know how to do FULLTEXT index syntax for MySQL. To work around it, you can either write migration and execute SQL, or put: config.active_record.schema_format = :sql in your environment.rb to stick with SQL schema format. Don't put anything in schema.rb manually, it will get overwritten. See [http://dev.rubyonrails.org/ticket/4474] for bug tracking reference.
on 2006-03-29 06:01
on 2006-03-29 11:17
Hi ! 2006/3/28, Zak Mandhro <firstname.lastname@example.org>: > See [http://dev.rubyonrails.org/ticket/4474] for bug tracking reference. Actually, this is not a bug per se. Rails has database agnostic adapters. Database-specific options like MySQL's FULLTEXT are unsupported by the adapters. As you mentionned, switching back to :sql as the schema format will keep your database specific options intact. Bye !
on 2006-03-29 17:39
FranÃ§ois Beausoleil wrote: > Actually, this is not a bug per se. Rails has database agnostic > adapters. Database-specific options like MySQL's FULLTEXT are > unsupported by the adapters. I agree, FULLTEXT is not standard SQL and we can't expect Ruby schema to handle it. However, the generated schema.rb should not generate invalid DDL SQL. I would rather it not create the "add_index" in schema.rb. But then, I may be asking for too much :) This is low low priority bug, if anything. - Zak