[Dbix-class] Ideas for database versioning.

Bill Moseley moseley at hank.org
Tue Nov 6 02:10:29 GMT 2012


I've been looking over DBIx::Class::DeploymentHandler but not sure it's
really what I'm after.

We manage our schema DDL separately from our DBIC classes (it's not just
DBIC that accesses the database).   That is, we don't generate the schema
DDL from DBIC.

Here's the problem that came up recently:

We have one large app that uses a DBIC model layer.   Someone working on
this app added a new column to a result class and ran the ALTER script on
their test database.  A ticket was created to make sure the ALTER script is
run at (or before, really) release time on the production database.

Now, in the mean time another developer worked on a second app that also
uses the same DBIC model code.   They did not notice the new column had
been added because they use the same dev database.   Of course, when that
app got pushed to production the ALTER script had not been run yet for the
first app.

Essentially, I'm looking for ideas how to make sure that the DBIC model has
its dependencies met -- which includes schema updates -- in some automated
way.   Hopefully in a foolproof way, too.

What system do you use to make sure changes are tracked and are on the
right database at the right time?



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20121105/f36=
2eb76/attachment.htm


More information about the DBIx-Class mailing list