Primary Keys enforcement vanishes in test database

I use this naming convention for primary keys:

= :table_name_with_underscore

I generate the MySQL test database: rake db:test:prepare, and although
the column is there there is no primary key enforcement/index and no
autoincrement (so activerecord saves fail). Is this a bug? What is
the best workaround?


Looks like a bug:

Does using rake db:test:clone_structure do the job? see

That's the ticket!

rake db:test:clone_structure
is the successful workaround