Re: [PEPr] Comment on Tools and Utilities::DbDeploy
| From: | Luke Crouch | Date: | Mon, 17 Sep 2007 13:25:08 +0000 |
| Subject: | Re: [PEPr] Comment on Tools and Utilities::DbDeploy | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48029@lists.php.net to get a copy of this message | ||
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
>