History of bitweaverUpgrade
Version 15
bitweaverUpgrade
How to Upgrade bitweaver
Created by: Stephan Borg, Last modification: 12 Aug 2005 (13:03 UTC) by Stephan Borg
bitweaverRelease Upgrades
whatever you do, always make a backup. whether you are about to do minor upgrades or large ones, please always backup your files and database first. we put a lot of effort into creating reliable installation / upgrade processes and making them as easy and quick as possible, however there are so many different setups and you might be using the one that causes probems ;)bitweaver Files and Directories
the following files and directories contain dynamically stored data, which you have to copy to your new installation:- kernel/config_inc.php
- This is the file, which is written during the installation process and which contains all the database access information. Without this file, you will be redirected to the install page as soon as you try to access bitweaver.
- storage/
- The storage directory contains all files that are uploaded to your site. if you omit this directory, your users can not access any files that have previously been uploaded.
- temp/
- The temp directory contains all cache related items and also it stores any custom modules created. Nexus creates such modules on the fly and hence, no custom modules or menus will work on your new site if you don't copy this folder accross as well.
- 3rd party applications
- third party applications such as phpbb and gallery2 have their own configuration files. also, it is important that you check their upgrade process for individual packages if there have been database changes to these. please someone help with these, as i'm not familiar with these applications.
1.0.* --> 1.0.3
These are bugfix releases and have no database changes whatsoever.follow the following procedure:
- make a backup of your files (and database if possible - just to be on the safe side).
- upload / unpack the downloaded archive in the same location as it was before.
- copy the files and directories mentioned above to your new version of bitweaver.
- point your browser to http://my.cool-bitweaver.site/
Upgrade Gotcha's
- You may need to increase your PHP.INI memory_limit value up to 64M during upgrades of large sites
- Don't forget to reimport your customised styles into the themes/styles directory of the new installation
- Don't forget to confirm your start page during the installation
Generic Database Upgrades / Conversions
bitweaver has a powerfull yet simple 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.
How does it work?
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.
<?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(); } '
)
)
);
?>
</package>