Skip to content

janv/dbserialize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

DBSERIALIZE

Dbserialize provides two rake tasks to store your current environments database
tables to Yaml fixtures in db/fixtures and to fill the database with these
fixtures.

That way it’s possible to store sample data consistently in the repository and
for all developers on a project to use common sample data instead of manually
generating something on every developer machine or sending database dumps around
via email.

Please read on the blog post.

INSTALL

You can easily add it to your rails project (from your rails app root)

  git submodule add git://github.com/janv/dbserialize.git vendor/plugins/dbserialize

or get it from github through git

  git clone git://github.com/janv/dbserialize.git vendor/plugins/dbserialize

You can keep it fresh with

  git submodule init
  # or
  git submodule update

USAGE

To save your database to Yaml call

  rake db:serialize:save

To resore the database from the fixtures call

  rake db:serialize:load

To only export certain tables, set the FIXTURES environment variable to a list
of table names seperated by commas:

  FIXTURES="users,posts" rake db:serialize:sav

LEGAL

Copyright © 2007-2009 Jan Varwig, released under the MIT license

About

Development data serialization for Rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages