Rails structure loading patches rails tasks to allow you to store and retrieve your database in SQL format.
Currently it only supports PostgreSQL
From gemcutter:
gem install rails_structure_loading
in your Rakefile:
require 'rails_structure_loading'
in your environment.rb
ActiveRecord::Base.schema_format = :sql
-
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
-
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 © 2009 Nick Gauthier. See LICENSE for details.