Subject Re: [firebird-support] database refactoring
Author Milan Babuskov
Mike Dewhirst wrote:
> Database refactoring has been of great interest to me for long time.
> Largely because I have never been able to foresee requirements far
> enough ahead to ever get the design right first time.
>
> This link is an essay (five minute read) by Martin Fowler on the topic.
>
> http://www.martinfowler.com/articles/evodb.html
>
> Does anyone in this group know of the availability of scripts/tools
> described in the essay for Firebird projects?

You can use FlameRobin's loggin feature to collect .sql scripts of DDL
and DML changes while developing. It has fine-grained control over the
logging process (DML/DDL, use multiple or single file, log SET TERM for
isql usage, etc.)

In contrast to what Fowler proposes, I rather keep all the changes
(incremental sql scripts) in common source-code control repository
(Subversion in my case) as a bunch of small plain-text files - each
containing a single DDL or DML change.

I have developed few PHP scripts:
- to run those .sql scripts to update the database to given version.
- to manage those script files (move version number, rename, etc.)

Given the fact that scripts are stored in central Subversion repository,
there is no need for "master" database, and also no need for all those
mechanisms to keep developers informed about changes. You just use
standard update/commit/diff/etc. commands against Subversion to get all
the information.

--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org