A few minutes ago, I released a proof-of-concept custom install task/custom install role pair of packages at pear.chiaraquartet.net.
PEAR_Task_Chiara_Managedb and PEAR_Installer_Role_Chiaramdb2schema work together along with a post-install script in the PEAR_Task_Chiara_Managedb package to automatically initialize and upgrade the database structure of applications.
The end-user is responsible for setting the DSN that should be used to access the database via the post-installation script (installation will simply fail with an error message if this has not occurred).
To use, your package should contain a <usesrole>/<usestask> combo like this following:
<usesrole>
<role>chiaramdb2schema</role>
<package>PEAR_Installer_Role_Chiaramdb2schema</package>
<channel>pear.chiaraquartet.net</channel>
</usesrole>
<usestask>
<task>chiara_managedb</task>
<package>PEAR_Task_Chiara_Managedb</package>
<channel>pear.chiaraquartet.net</channel>
</usestask>
Then, in the contents section, an MDB2_Schema-based schema file defining database structure should be entered like so:
<file role="chiaramdb2schema" name="schema.xml">
<tasks:chiara_managedb/>
</file>
The rest of the work is performed by the excellent MDB2_Schema package, which has the ability to examine two schema files, generate a diff, and literally upgrade the database structure. Because of this strength, it is no longer necessary to provide special sql files differentiating each release (although this is not a bad idea for those who like to do manual configuration). Note that as a proof-of-concept, this code is alpha stability. This means that those using it will be testing out the solution for the purpose of experimenting with seriously bleeding-edge technology. All the same, the source code for such a complex task was incredibly easy - and simple - to write, showing just how much is actually possible with PEAR 1.4.3 and newer.
These packages both require PEAR 1.4.3 and newer to function properly, due to bugfixes. PEAR 1.4.3 is not released yet, and is undergoing final release preparations at the moment, but will be out very soon.
Enjoy!