History of bitweaverUpgrade
Version 5
bitweaverUpgrade
How to Upgrade bitweaver
All of this code is only in bitweaverCVS and the latest fresh build
bitweaver has a powerfully simply upgrader that is part of the InstallPackage. With a single click you can give your old site the power of bitweaver.
Our architecture for upgrading, like all of bitweaver, is modular and powerful. Every BitweaverPackage maintains its own upgrade script. This architecture enables you to upgrade *any* CMS to *any* bitweaver version. Anyone up for a drupal upgrader? *nuke upgrader? TW1.9 upgrader?
Currently it handles TikiWiki 1.8 and bitweaver ReleaseZero updates. It uses a lot of subselects so you will need a real database or at least MySQL 4.1.
install/upgrade.php does all the magic by looking at every BitweaverPackage's <package>/admin/upgrade_inc.php. This file has upgrade hashes of SQL *and* php for each package version and particular RDBMS as necessary. Below is a brief example. We suggest you look at liberty/admin/upgrade_inc.php if you are interested in seeing a complete example of how it works, or shoutbox/admin/upgrade_inc.php for a simpler example.
{CODE(in=>PHP)}
$updateHash = array(
'TW18' => array(
'2.0' => array(
'pgsql' => 'ALTER TABLE tiki_pages RENAME `pageId` TO `page_id`'
)
),
'2.0' => array(
'3.0' => array(
'sql92' => "ALTER TABLE tiki_pages ADD foo VARCHAR(20); UPDATE tiki_pages SET foo='bar';",
'php' => 'foreach( $hash as $key ) { doSomething(); } '
)
)
);
{CODE}
</package>