Re: Re: [PEPr] Comment on Tools and Utilities::DbDeploy

From: Date: Mon, 17 Sep 2007 16:28:08 +0000
Subject: Re: Re: [PEPr] Comment on Tools and Utilities::DbDeploy
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48030@lists.php.net to get a copy of this message
ah, okay. I had seen MDB2_Schema when I started, but I think there's a few important differences that make this a viable separate alternative approach: * Change/Refactoring/Versioning focus - as I understand it, MDB2_Schema is, obviously, schema-centric. i.e., it's based on the established state of entities and data, rather than the changes that have occurred against the schema. DbDeploy is based on the *changes* to the schema - tracking and managing those in such a way that any database can be deployed (or rolled-back) to any of the current or previous "version" of the schema. * No XML - I'm not *against* XML, but many developers are simply more comfortable reading (and performing) db changes in SQL rather than XML. * No MDB2 dependency - in fact, no DB abstraction at all. this can be both positive and negative - positive in the sense that if you are working on a project in which you have full control over the DB platform (as is the case in many website projects), you can directly use platform-specific SQL dialect and features in your db schema changes. * command-line interface - this package installs a command-line tool for performing its operations, while MDB2_Schema appears aimed at usage from inside PHP script files. (though they could just as easily be run from CLI) having said all that, I see the two overlap a bit; but I think they could complement each other. i.e., use dbdeploy to track, manage, and deploy changes to the schema, and use MDB2_Schema to snapshot the states of the schema. like how subversion provides revision-based change tracking, but also allows you to tag snapshots of any specific revision. -L On 9/17/07, Travis Swicegood <travis@domain51.com> wrote: > > Hi Luke, > > I believe what Till was referring to was the MDB2_Schema code where > it uses XML schema files to do something very similar. The > differencing being that it figures out the changes for you. This > does look like an interesting project, despite the possible overlap > in use. > > -Travis > > > On Sep 17, 2007, at 8:25 AM, Luke Crouch wrote: > > > DbDeploy is a technique and open-source tool for managing changes > > to the db > > schema. when you want to make schema changes, rather than just > > changing it > > by hand, you write a "delta script" which changes the schema. > > > > e.g., if you start with an empty database and want to add a test > > table, you > > would make a delta script called "001_create_test_table.sql" with > > the create > > table statement (as in the example project linked in the > > documentation: > > http://peardbdeploy.sourceforge.net/docs/). you can (and > > should) also > > include an "undo" section of the script, which effectively rolls > > back the > > change made by the delta script. > > > > in this way, you treat the db schema as a "versioned" resource, and > > you can > > use dbdeploy and the delta scripts to quickly change your db schema > > up (or > > down) to any "version" you want. does that help clarify it? > > dbdeploy is > > frequently used in java projects; more information about dbdeploy > > itself is > > at dbdeploy.com. my proposal is for a PEAR-packaged command-line > > tool so > > that PHP projects can use the same effective and well-established > > conventions. > > > > -L > > > > On 17 Sep 2007 09:43:12 -0000, Till Klampaeckel <till@php.net> wrote: > >> > >> > >> Till Klampaeckel (http://pear.php.net/user/till) has commented on the > >> proposal for Tools and Utilities::DbDeploy. > >> > >> Comment: > >> > >> Curious - is "DbDeploy" another word for schema? > >> > >> > >> > >> I'm sorry if I fail to understand, but can you elaborate on the > >> differences. E.g., why should I use DbDeploy when I use a schema? > >> > >> Proposal information: > >> http://pear.php.net/pepr/pepr-proposal-show.php?id=507 > >> > >> -- > >> Sent by PEPr, the automatic proposal system at > >> http://pear.php.net > >> > >

« previous php.pear.dev (#48030) next »