Our testing system broke once we introduced VIEWS and STORED PROCEDURES to our database (a legacy MS SQL server for production, MySQL 5 for development and tests). Neither schema format (:ruby or :sql) plays nicely when exporting the schema for the database, so we opted for a workaround. The workaround runs our migration scripts to ready the test database if you set schema format to :migrate (in config/environment.rb). We were able to leverage the existing rake tasks for purging the test database, and loading the migration scripts--and we now have an excellent platform for testing our "complex" schema based app. The patch was developed by Andre Price under the direction of Jonathan Siegel at ELC Technologies.