[LRUG] Dumping A Database Ruby-Style
Nathaniel Brown
nshb at inimit.com
Mon Dec 10 17:46:10 PST 2007
Glad the code helped :)
On 12/4/07, Andrew Stewart <boss at airbladesoftware.com> wrote:
>
>
> On 4 Dec 2007, at 12:03, Tom Stuart wrote:
>
> > 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".
>
> That looks perfect. Thank you!
>
> The code appears to use only selects and inserts, not mysqldump, so
> it should neatly sidestep my problem.
>
> Thanks again,
> Andy Stewart
>
> -------
> http://airbladesoftware.com
>
>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
--
Nathaniel Steven Henry Brown
604-724-6624
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20071210/01d0aff5/attachment-0003.html>
More information about the Chat
mailing list