This project is archived and is in readonly mode.

#5412 new
Nick Gauthier

[Patch] Rails schema_format :sql should behave like schema_format :ruby

Reported by Nick Gauthier | August 19th, 2010 @ 07:44 PM

When ActiveRecord::Base.schema_format is set to :sql it should mimic the behavior of :ruby (db/schema.rb).

I've created a patch that maintains all the existing rake targets (like db:reset, db:migrate, db:setup, etc.) and toggles between the tasks appropriately.

I also added a db:structure:load task so that it could be toggled with db:schema:load.

I've attached the patch. I tried to keep with the conventions found in the existing file.

Note that there are a few other tickets similar to this one. However, the only ticket of those with a patch creates extra and differently named rails tasks, which does not accomplish the goal I attained here. The other tickets are merely feature requests.

-Nick Gauthier

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>