Repository is archived
No commit activity in last 3 years
No release in over 3 years
Generate and load SQL structure files for your migrations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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'

in your environment.rb

ActiveRecord::Base.schema_format = :sql

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 © 2009 Nick Gauthier. See LICENSE for details.