KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an issue with stored procedures and the test database in Rails 3.0.7. When running rake db:test:prepare it migrates the db tables from schema.rb and not from migrations directly. The procedures are created within migrations by calling the execute method and passing in an SQL string such as CREATE FUNCTION foo() ... BEGIN ... END; . So after researching, I found that you should use config.active_record.schema_format = :sql inside application.rb . After adding this line, I executed rake db:structure:dump rake db:test:clone_structure The first one is supposed to dump the structure into a development.sql file and the second one creates the testing database from this file. But my stored procedures, and functions are still not appearing in the testing db. If anyone knows something about this issue. Help will be appreciated. I also tried running rake db:test:prepare again, but still no results. MySQL 5.5, Rails 3.0.7, Ruby 1.8.7. Thanks in advance!
Tags (comma-separated)
Save Edits
Cancel