Subject Re: [firebird-support] database refactoring
Author Milan Babuskov
Mike Dewhirst wrote:
>>I have developed few PHP scripts:
>
> You should try Python :)

Probably :)

Most of the apps. I write are either C++ or PHP, so this was more
natural way (I can embed it in apps). Hm, Python is also easy to embed.
I might take a look into it.

>>- to run those .sql scripts to update the database to given version.
>>- to manage those script files (move version number, rename, etc.)
>
> I think that is extremely valuable. Would you care to open source them?
> The design goals for such scripts would be exactly what I'm looking for.

In fact, I plan to present a detailed paper on all this on the next
Firebird Conference (if it gets accepted, that is). So, all scripts and
tools will be translated to English and open sourced by the time
conference starts. It is all still in Serbian language, and most usage
docs are still only in my head ;)

> This tells me that anyone can update the master after writing the
> refactoring script, testing in the sandbox and committing the script. As
> soon as everyone updates from the repository, everyone's database is
> automatically updated and their tests and code either passes or fails
> and problems get fixed quickly.

Yes. But you don't need the "master". In fact, you can have different
database structure for different customers if you use branching, merging
and tagging in Subversion repository.

The only thing missing is "undo" ability - getting the database back to
certain revision, reverting changes, etc. This is a topic for itself,
and I'd like to see some docs or ideas on that.

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