[Dbix-class] Dump table to disk

Jess Robinson castaway at desert-island.me.uk
Sat Mar 14 10:36:58 GMT 2009



On Wed, 4 Mar 2009, Dermot wrote:

> 2009/3/4 Jonathan Yu <jonathan.i.yu at gmail.com>:
>> Hi there:
>>
>> You can dump the Schema object into SQL, but I'm not sure if it also
>> dumps the appropriate INSERTs... Look in SQL::Translator, that's where
>> you're most likely to find something like that (SQLT is the backend
>> that does some of the nitty-gritty on behalf of DBIC)
>>
>> Storable seems like a hackish way to do things. Personally I would
>> suggest you dump SQL.
>>
>
> Thanx Jonathan. I did it the hackish way. I was a single table so the
> structure was easy to store. This was for an SQLite3 db which doesn't
> have a dump function quite yet. It does have a realitvely new backup
> function (http://www.sqlite.org/backup.html).


Mine does, which sqlite3 are you using?

sqlite3 mydb.db ".dump"

IIRC, works in the CLI anyways..

Jess




More information about the DBIx-Class mailing list