[Dbix-class] Schema export
Matt S Trout
dbix-class at trout.me.uk
Thu Mar 2 14:18:31 CET 2006
On Thu, Mar 02, 2006 at 11:30:17AM +0100, Bernhard Graf wrote:
> Jonas Alves wrote:
> > I think sqlt isn't prepared to handle DBIC. I patched it this way.
>
> > So now you just need to do:
> > sqlt --from SQL::Translator::Parser::DBIx::Class \
> > --to MySQL --schema My::Schema
> >
> > Maybe there is another way but this works for me.
>
> Can Matt or someone else shed light on this...?
The sqlt command line tool is a bit weird about what arguments it'll take;
I think Jess Robinson's done some fixups to sqlfairy CVS that'll be in the
next release.
Meantime, loading your schema and calling $schema->deploy(); to populate an
empty database or
print $schema->storage->deployment_statements($schema);
to spit the CREATE TABLE statements to STDOUT should work fine on the
-current branch.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list