public
Description: Generate and load SQL structure files for your migrations
Homepage:
Clone URL: git://github.com/ngauthier/rails_structure_loading.git
README.rdoc

rails_structure_loading

Rails structure loading patches rails tasks to allow you to store and retrieve your database in SQL format.

Currently it only supports PostgreSQL

Installation

From gemcutter:

  gem install rails_structure_loading

Usage

in your Rakefile:

  require 'rails_structure_loading'

What it does

New Tasks

  • db:structure:load - loads db/structure.sql into the DB
  • db:structure:dump - creates db/structure.sql from the DB
  • db:domain:load - loads db/domain.sql into the DB (this is your app’s domain data, not seed data)
  • db:domain:dump - dumps the data in the database into db/domain.sql

Modified Tasks

  • db:reset will load the structure and domain data if the file exists, otherwise it will use the schema as usual
  • db:migrate will dump the structure and domain data after running

Copyright

Copyright © 2009 Nick Gauthier. See LICENSE for details.