MDB2_Schema in a new installer/upgrader

Author: Helgi Žormar Žorbjörnsson, helgi _AT_ trance _DOT_ is
Date: 17th April, 2005

Still being written


We’d drop all .sql, we’d stop doing straight sql CREATE table things, it’s simply too unportable. Instead we start using the XML Schema from MDB2_Schema[3] which is very portable since it will get parsed and database specific queries are made so we don’t have to maintain multiple .sql files for different RDBMS. We can both make use of this in the install process as well as in the upgrade process. When upgrading all we need to do is have a the schema file from the previous release for MDB2_Schema to compare to, and if we rename a field it is as easy as

<!-- insert xml here -->
<!-- insert more xml here -->

For further reading look at the xml_schema docs[4] and I’ll link to a working example of this kind of install/upgrader I’m doing for a workshop at the PHPConference[5] in Amsterdam 1st May


1st step would be to move 0.5 sql stuff to xml schema, second would be to refactor the installer/upgrader.

Now for upgrading we’ll always make the xml schema from the previous version come with Jaws for upgarding purposes and it shall always be named like so: name-version.old were as the original one used by the installer is simply name.xml.

This will allow us to do database independent installs as well as upgrades in a easy fashion.

Note. This proposal depends on that MDB2[2] proposal[1] will be accepted.


  /var/www/wiki/htdocs/data/jaws/proposals/mdb2_schema.txt · Last modified: 2007/11/02 16:27