You are on page 1of 2

7/14/2014 adamwiggins/yaml_db

https://github.com/adamwiggins/yaml_db 1/2
[
HTTPS clone URL
https://github.com/adamwiggins/yaml_db.git
You can clone with HTTPS, SSH,
or Subversion.
_ latest commit 2b3e3546da
Rails plugin for a database-independent dump format, data.yml. This fork no longer maintained, please see:
http://github.com/ludicast/yaml_db

yaml_db /
point people to ludicast's fork
adamwiggins authored on Dec 22, 2009
M lib Revert "verify the database encoding is utf8 or unicode" 6 years ago
M spec Revert "verify the database encoding is utf8 or unicode" 6 years ago
M tasks init 6 years ago
_ README point people to ludicast's fork 5 years ago
_ Rakefile init 6 years ago
_ about.yml init 6 years ago
_ init.rb init 6 years ago
README
This repo is no longer maintained, please see http://github.com/ludicast/yaml_db
for a currently maintained fork.
------------------------------------------------------------------------------
= YamlDb
YamlDb is a database-independent format for dumping and restoring data. It
complements the the database-independent schema format found in db/schema.rb.
The data is saved into db/data.yml.
This can be used as a replacement for mysqldump or pg_dump, but only for the
databases typically used by Rails apps. Users, permissions, schemas, triggers,
and other advanced database features are not supported - by design.
Any database that has an ActiveRecord adapter should work.
== Usage
rake db:data:dump -> Dump contents of Rails database to db/data.yml
rake db:data:load -> Load contents of db/data.yml into the database
Further, there are tasks db:dump and db:load which do the entire database (the
equivalent of running db:schema:dump followed by db:data:load).
== Examples
One common use would be to switch your data from one database backend to
another. For example, let's say you wanted to switch from SQLite to MySQL. You
might execute the following steps:
1. rake db:dump
2. Edit config/database.yml and change your adapter to mysql, set up database
params
3. mysqladmin create [database name]
4. rake db:load
lcosta + y (
2 226 185 @ Watch Unstar y Fork
adamwiggins / yaml_db
PUBLIC
g
O Code
Issues
1
Q Pull Requests
0
Wiki
+ Pulse
@ Graphs
y Network
_
@
g Clone in Desktop
Download ZIP
12 commits y 1 branch ( 0 releases g 3 contributors
@ [ y master branch:
+
Explore Gist Blog Help Search or type a command This repository @
7/14/2014 adamwiggins/yaml_db
https://github.com/adamwiggins/yaml_db 2/2
== Credits
Created by Orion Henry and Adam Wiggins. Major updates by Ricardo Chimal, Jr.
Patches contributed by Michael Irwin, Tom Locke, and Tim Galeckas.
Send questions, feedback, or patches to the Heroku mailing list:
http://groups.google.com/group/heroku
Status API Training Shop Blog About 2014 GitHub, Inc. Terms Privacy Security Contact
[

You might also like