Help with tests/rake issues

Hi All,

I have run into an odd issue in rails/tests (it might actually be a bug). Unlike most rails apps, I have changed the id column in my tables to be char(32). There are many reasons for this, so don't ask :wink:

Anyhow, my migrations work just fine and create the tables etc but I have run into issues with testing. For some reason rake db:test:prepare clones my dev db but switches all the id fields back to int. I suspect that rake uses schema.rb to create the test database and that would explain the wrong id type since the schema.rb produced after each migration omits the id fields.

So, my migration looks like this:

create_table "activities", :id=>false, :force => true do |t|   t.column :id, :string, :limit => 32, :null => false   t.column "activity_name", :string, :limit => 50 end

but once the migration runs the above table is represented in schema.rb like this:

create_table "activities", :force => true do |t|   t.column "activity_name", :string, :limit => 50 end

(rake db:schema:dump also omits ids)

So it looks like the solution might be either: 1. Fix rake to dump correct schema 2. Make rake clone the dev db in some other way

Any ideas?

Thanks

Raf