views:

39

answers:

1

Is it possible to do a "rake db:migrate" or "rake db:schema:load" without it loading all my models first?

I'm using the acts_as_solr plugin, and it requires that the table exists before the model can be loaded. This is probably a bug in acts_as_solr, but the only workaround I found is to uncomment the acts_as_solr line in my model, run the migrations, and uncomment it again.

+2  A: 

By explicitly specifying the field types for acts_as_solr, it doesn't try to find the types from the table, and I'm able to run the migrations:

acts_as_solr :fields => [{:contents => :text}, {:user_id => :integer }]

Ralf
Well done... I wasted a few hours on this already - I was trying to debug why the hell it needs to do this whilst running migrations!
Spasm