fix security issue
[selectricity] / vendor / plugins / yaml_db / README
1 = YamlDb
2
3 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.
4
5 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.
6
7 Any database that has an ActiveRecord adapter should work.
8
9 == Usage
10
11 rake db:data:dump   ->   Dump contents of Rails database to db/data.yml
12 rake db:data:load   ->   Load contents of db/data.yml into the database
13
14 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).
15
16 == Examples
17
18 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:
19
20 1. rake db:dump
21
22 2. Edit config/database.yml and change your adapter to mysql, set up database params
23
24 3. mysqladmin create [database name]
25
26 4. rake db:load
27
28 == Credits
29
30 Created by Orion Henry and Adam Wiggins.  Major updates by Ricardo Chimal, Jr.
31
32 Patches contributed by Michael Irwin, Tom Locke, and Tim Galeckas.
33
34 Send questions, feedback, or patches to the Heroku mailing list: http://groups.google.com/group/heroku
35

Benjamin Mako Hill || Want to submit a patch?