Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

ngauthier/rails_structure_loading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Generate and load SQL structure files for your migrations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages