[Catalyst] Re: recommendation
Matt S Trout
dbix-class at trout.me.uk
Sat Nov 15 19:27:25 GMT 2008
On Mon, Nov 10, 2008 at 09:40:13PM +0200, Octavian Rasnita wrote:
> >although it's not what you asked, i'll comment that i've had great luck
> >doing this the other way round: i write the classes (with a lot of help
> >from an emacs template*) and generate a DDL script from those. in
> >addition to making table creation trivial, sqlt-diff produces scripts
> >which (usually) do a fine job of upgrading from one version to another.
> >
> >see create_ddl_dir() here: http://tinyurl.com/5vgwcj and sqlt-diff here:
> >http://tinyurl.com/6ql6wo for details.
> >
> >i'm much better at writing perl classes than DDL though, so it was
> >obvious that this was the right thing for me in a 50 table, 10 view
> >database. no doubt your mileage will vary.
> >
> >
> >k.
>
> This could be also a good solution, but unfortunately it gives so many
> errors that it would be more simple to update the DBIC classes manually.
> I've just tried create_ddl_dir again to see if it works better now, but I
> needed to make more tens of corrections for a database with only 10 simple
> tables.
This approach *is* best practice and it *does* work fine for SQLite, MySQL
and Postgres at least.
If you need to make tens of corrections, one of two things is happening:
(1) you've found a bug and should have reported it but didn't
(2) you did something wrong
Either way, please get on the dbix-class list and report what code you have
and we can tell you which it is.
->deploy *is* best practice, it *does* work and it's going to be marked
non-experimental for 08100.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the Catalyst
mailing list