Peter Michaux
2008-Apr-04 05:14 UTC
rails unit testing removes foreign key constraints in test database?
I''ve noticed that when testing is finished that at some point Rails has removed the foreign key constraints from my test database. Does anyone know where this foreign key constraint deletion occurs in the source code. I''d like to turn it off. Thanks, Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter Michaux
2008-Apr-04 06:39 UTC
Re: rails unit testing removes foreign key constraints in test database?
On Apr 3, 10:14 pm, Peter Michaux <petermich...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve noticed that when testing is finished that at some point Rails > has removed the foreign key constraints from my test database. Does > anyone know where this foreign key constraint deletion occurs in the > source code. I''d like to turn it off.After much hunting, I found the issue. I needed to add the following to my environment.rb file config.active_record.schema_format = :sql Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---