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

Riccardo Tacconi rtacconi at gmail.com
Fri Feb 5 03:55:11 PST 2010


Ok Andrew,

I forgot to copy a patch available on Rail's Trac:
http://dev.rubyonrails.org/attachment/ticket/5001/migrator_must_not_add_table_preffix_nor_suffix.patch

On Fri, Feb 5, 2010 at 11:43 AM, Andrew Stewart
<boss at airbladesoftware.com>wrote:

> 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
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>



-- 
Riccardo Tacconi
Web developer at Wolseley UK
VIRTUELOGIC LIMITED (Director)

http://www.linkedin.com/in/riccardotacconi
http://riccardotacconi.blogspot.com/
http://twitter.com/rtacconi
Linux user: #400461
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20100205/9847fa49/attachment-0003.html>


More information about the Chat mailing list