Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4814 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 1 year ago

[PATCH] database test using migrate

Reported by: aprice@elctech.com Assigned to: David
Priority: normal Milestone:
Component: Railties Version:
Severity: normal Keywords: rake migrate test db
Cc: jsiegel@elctech.com

Description

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.

Attachments

db_test_using_migrate.diff (1.2 kB) - added by aprice@elctech.com on 04/20/06 03:48:51.

Change History

04/20/06 03:48:51 changed by aprice@elctech.com

  • attachment db_test_using_migrate.diff added.

05/25/07 07:08:00 changed by danger

  • status changed from new to closed.
  • resolution set to wontfix.

This is a great idea for a plugin. If you release it and most Rails developers begin using it then it might be a good candidate for core. Until then I'm going to close this ticket.

07/12/07 09:35:19 changed by jsiegel@elctech.com

We have made this into a plugin called migrate_test_db. Read more at: