[Dbix-class] Problem with DBIx::Class::Schema::Loader

Brandon Black blblack at gmail.com
Thu Aug 24 01:07:54 CEST 2006


On 8/23/06, James Masters <james at masters.me.uk> wrote:
>
> I'm new to DBIx and have managed to get DBIx::Class working using mysql by
> setting up a couple of test schema modules.
>
> I don't really understand what Loader does. Does it create a whole load of
> module files with the schema info that I would otherwise have to write out
> manually and then read them in?  If so, presumably, this only needs to
> happen once so do I just write a sepeare script to run once?
>
> Or does it simply read my MySQL database tables columns and wotnot into
> memory every time and dispenses with the schema info modules altogether
> (this is what I was hoping it would do).


It can do either one, depending on how you use it.  The "normal" way of
using it
scans the database at load time into memory and doesn't create any
modules/files,
but you can also invoke it a different way and it will generate module files
on disk,
which look about like a manually-written schema and can be edited from
there.

The interface for using the schema export stuff is very ugly right now, but
it is
documented in the Schema::Loader manual.  Hopefully in the not-to-distant
future,
it will be wrapped up in a simpler commandline interface, probably by
plugging
some features in the existing "dbicadmin" commandline shell.

-- Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20060823/7403737a/attachment.htm 


More information about the Dbix-class mailing list