[Chicago-talk] Database Migrations using DBIx::Class (instead)
Michael D. Stemle, Jr.
manchicken at notsosoft.net
Tue Mar 27 07:32:49 PDT 2007
On Tuesday 27 March 2007 00:39:38 Jonathan Rockway wrote:
> On Tuesday 27 March 2007 00:23, Michael D. Stemle, Jr. wrote:
> > Okay, so I'm trying to think up a way of making replicable migration
> > scripts that are more portable for general distribution... DBIx::DBSchema
> > kinda stuck out to me as a possible means of doing this.
> > The problem is that I'm going through it, it's generating the SQL, but
> > for some reason it's not executing it properly (as documented), so I'm
> > kinda having to hack it a bit and manually execute the SQL that is
> > generated. It's not THAT big of a hack, but I was hoping to get it happy.
> DBIx::Class is much nicer for this. It supports schema versioning and
> automatic deployment to any supported database (SQLite, MySQL, Postgres,
> SQL Server, Sybase, DB2, and Oracle). I can expand on this, but the
> DBIx::Class docs are pretty good and #dbix-class will probably help you
> with anything you need.
DBIx::Class is nice for the class stuff. Are you talking about creating the
schema using SQL::Translator?
> The only disadvantage is that version information is stored out-of-band on
> the filesystem, not in the database.
> > I'm open to ideas. Attached is the script I was playing with (signed).
Eh, the my vs. our thing is of little consequence. Readonly is a module that
isn't standard and isn't even in ubuntu or debian repos, so I'm less inclined
to use it. For named constants, use constant works quite well. use constant
also works on non-scalars as well.
> Jonathan Rockway
~ Michael D. Stemle, Jr. <><
(A)bort, (R)etry, (I)nfluence with large hammer
The number of the beast - vi vi vi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20070327/d220076c/attachment.bin
More information about the Chicago-talk