[Devel] database setup scripts

Henning Westerholt henning.westerholt at 1und1.de
Fri May 11 16:35:52 CEST 2007


Hello all,

the current process of database related changes could be in my opionion 
somewhat improved. If some changes are made in one module that needs a 
database schema update, these adoptions must be made in three different 
scripts for all databases. Sometimes one db (dbtext) is forgotten, or errors 
get introduced. We've seens this quite a few times in the past.
There also exist not a real database schema, one must gather the informations 
from the wiki and the setup scripts.

I think it would be better to generate the create table calls from a common 
specification, this is also the way one well know competitor handle this. ;-)

A first step would be to isolate the SQL snippets from the bash scripts, and 
provide one file for each database (part).

This snippets could easily used from the remaining script logic, no 
functionality should gets lost. 

The second step would be to generate the sql from an abstract definition (a 
custom format, or XML with XSL scripts), the old architecture will be remain 
and would be still used for database creation.

If the new process produce the same result as the old files could be deleted 
in the third step.

A good place for the schema would be the db directory, the sql snippets could 
be saved in scripts/sql/$DatabaseName

I would like to hear your opionion on this, as this is a central part of 
OpenSER. If nobody objects, i plan to start to work next week on this.

Best regards,

Henning



More information about the Devel mailing list