7 users responded in this post

Subscribe to this post comment rss or trackback url
User Gravatar
Tessa Lau said in January 26th, 2007 at 3:01 pm

I can’t seem to get this to do anything. I unzipped this into vendor/plugins, and ran rake db_schema_dump. The db/schema.rb file still has the same add_index call which fails on the TEXT field. Do I need to do something else to install the plugin?

User Gravatar
Tessa Lau said in January 26th, 2007 at 3:48 pm

Nevermind — I had forgotten to rename my index to have the FullText_ prefix.

User Gravatar
Niko said in April 16th, 2007 at 12:43 pm

Well written plugin, but why not just dump the schema in native sql?

# File: config/environment.rb
config.active_record.schema_format = :sql

User Gravatar
Zak Mandhro said in April 21st, 2007 at 10:24 am

Niko: As of Rails 1.1.6, the SQL generated by SchemaDumper failed to recognize the Full Text index, treating it like a simple index. So if you were to let Rails dump the SQL schema and recreated your database from it, your index would not work as expected.

This may have been resolved in 1.2, I haven’t checked.

User Gravatar
coolpositive said in December 10th, 2007 at 3:53 am

I can’t seem to get this to do anything. I unzipped this into vendor/plugins, and ran rake db_schema_dump. The db/schema.rb file still has the same add_index call which fails on the TEXT field. Do I need to do something else to install the plugin?

User Gravatar
Mysql Download said in March 28th, 2008 at 10:51 pm

Hi Finally I found a site the has some good information on Mysql Download. I was searching around and found your post Using MySQL Full Text Search with Rails, thanks for the good info..I’ll be checkin back soon.

User Gravatar
Aaron Gough said in February 9th, 2009 at 10:05 am

Hi Zak,
I implemented a modified version of your schema-dumper patch and then later discovered that it is not needed!

Rails has a built-in configuration option for handling schemas specific to a particular database:

config.active_record.schema_format = :sql

Simply set the above variable in your environment.rb file and everything works like magic!

Note that the schema.rb file will still be generated, but the test database will use a .sql file to reset everything. To get the current database schema in SQL format simply type rake db:structure:dump

-A

Leave A Reply

 Username (Required)

 Email Address (Remains Private)

 Website (Optional)