[Dbix-class] Ideas for database versioning.

Alexander Hartmaier alexander.hartmaier at t-systems.at
Tue Nov 6 08:49:30 GMT 2012


On 2012-11-06 03:10, Bill Moseley wrote:
I've been looking over DBIx::Class::DeploymentHandler but not sure it's rea=
lly what I'm after.

We manage our schema DDL separately from our DBIC classes (it's not just DB=
IC 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 th=
is app added a new column to a result class and ran the ALTER script on the=
ir test database.  A ticket was created to make sure the ALTER script is ru=
n at (or before, really) release time on the production database.

Now, in the mean time another developer worked on a second app that also us=
es 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 go=
t 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 righ=
t database at the right time?
What about a version table with a single version column that is checked at =
model connect time if the database schema version is what the model expects?



--
Bill Moseley
moseley at hank.org<mailto:moseley at hank.org>



_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co=
.uk



*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*
Notice: This e-mail contains information that is confidential and may be pr=
ivileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20121106/6f9=
b47dd/attachment.htm


More information about the DBIx-Class mailing list