[LRUG] Multiple databases, migration, integration...

Andrew Stewart boss at airbladesoftware.com
Fri Feb 5 03:43:51 PST 2010


Riccardo,

On 5 Feb 2010, at 11:18, Riccardo Tacconi wrote:
> I started to use prefix for table name but when I run rake  
> db:test:prepare I get all tables with two times the prefix appended.  
> For instance, in development _categories table becomes __categories  
> table, with two underscore. For a blog I understand that this is a  
> bug abd there is a patch four year old. Why they should not  
> integrated that patch in Rails?
>
> I am trying to apply the patch but I did not now how to do it.
>
> Have you had a similar problem?

I did run into that but didn't find a fix.  Now rake db:test:prepare  
crashes before it even reaches my tables because the legacy database's  
tables have invalid default values and MySQL refuses to create them in  
the test db.

So unfortunately I can't help you.  If you want to dig into Rails and  
fix it yourself, I suggest looking in the migration code:

http://github.com/rails/rails/blob/v2.3.5/activerecord/lib/active_record/migration.rb

Good luck!

Andrew

-------
http://airbladesoftware.com



More information about the Chat mailing list