Juanma Cuello
2011-Jun-21 22:04 UTC
rake db:test:clone_structure might fail with multiple schemas in postgres
Hi guys. I''m having problems when trying to run tests of a rails 3 application with multiple schemas in postgres. The thing is that ''rake db:test:clone_structure'' fails when tries to insert migration versions into ''schema_migrations'' table. This is because after all the schemas are dumped, the search path might be set to a schema other than the ''public'' and the schema_migrations table is not found. I''m not sure about the order in which postgres schemas are dumped (alphabetical?) but I think the problem appears when there are schemas alphabetically superior to ''public'' (e.g: ''z_schema_name''), assuming schema_migrations table is in the ''public'' schema. Anyway, I created a pull request that explains how to reproduce this issue with a few steps. https://github.com/rails/rails/pull/1094 I would appreciate if someone can take a look at it to know if there is something I missing. Thanks! Juan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.