[LRUG] Dumping A Database Ruby-Style
Tom Stuart
tom at experthuman.com
Tue Dec 4 04:03:34 PST 2007
On 4 Dec 2007, at 11:48, Andrew Stewart wrote:
> Is there a pure Ruby way, ideally a Rake task, to dump all the data?
I don't know enough about MySQL privileges to know whether this'll
avoid your problem, but:
* you can try dumping the schema using "rake db:schema:dump", and
loading it the other end with "rake db:schema:load"; and
* the Manage Fixtures plugin (http://svn.toolbocks.com/plugins/manage_fixtures/
) gives you a "rake db:fixtures:export_all" task that'll export the
current table contents into fixtures, which you can then load the
other end with "rake db:fixtures:load".
HTH,
-Tom
More information about the Chat
mailing list