summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-10-24 20:22:18 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-10-24 20:22:18 +0000
commit7b10b26b4960448d1b5915770ec6376474ed9db0 (patch)
tree8b83537a7439de88f296d6e2e5b73d9801015c32 /admin
parent9e368cf9e85d63e96d082d94552d0f49402ab42f (diff)
downloadwiki-7b10b26b4960448d1b5915770ec6376474ed9db0.tar.gz
wiki-7b10b26b4960448d1b5915770ec6376474ed9db0.tar.bz2
wiki-7b10b26b4960448d1b5915770ec6376474ed9db0.zip
lots more work towards package based upgrades. basics all working now. see wiki test upgrade script for details.
Diffstat (limited to 'admin')
-rw-r--r--admin/upgrades/1.0.2-beta.php21
-rw-r--r--admin/upgrades/1.0.3.php32
2 files changed, 40 insertions, 13 deletions
diff --git a/admin/upgrades/1.0.2-beta.php b/admin/upgrades/1.0.2-beta.php
index a1fb933..0ea9268 100644
--- a/admin/upgrades/1.0.2-beta.php
+++ b/admin/upgrades/1.0.2-beta.php
@@ -1,12 +1,23 @@
<?php
global $gBitInstaller;
-$gBitInstaller->registerPackageUpgrade( WIKI_PKG_NAME, '1.0.2-beta', array(
+$infoHash = array(
+ 'package' => WIKI_PKG_NAME,
+ 'version' => '1.0.2-beta',
+ 'description' => "Creates a test table 'test_table_1'.",
+ 'post_upgrade' => NULL,
+);
-array( 'ALTER' => array(
- 'something' => array(
- 'content_id' => array( '`content_id`', 'I4' ),
- ),
+
+$gBitInstaller->registerPackageUpgrade( $infoHash, array(
+
+array( 'DATADICT' => array(
+ array( 'CREATE' => array (
+ 'test_table_1' => "
+ test_col_1 C(32) PRIMARY,
+ test_col_2 C(64)
+ ",
+ )),
)),
));
diff --git a/admin/upgrades/1.0.3.php b/admin/upgrades/1.0.3.php
index fcacbe2..31153cb 100644
--- a/admin/upgrades/1.0.3.php
+++ b/admin/upgrades/1.0.3.php
@@ -1,18 +1,34 @@
<?php
global $gBitInstaller;
-$gBitInstaller->registerPackageUpgrade( WIKI_PKG_NAME, '1.0.3', array(
+$infoHash = array(
+ 'package' => WIKI_PKG_NAME,
+ 'version' => '1.0.3',
+ 'description' => "Creates another test table 'test_table_2' and then removes both tables again. This way you can rerun this test process. All you need to do is uncomment the version store line in install_upgrade.php.",
+ 'post_upgrade' => NULL,
+);
-array( 'ALTER' => array(
- 'something' => array(
- 'content_id' => array( '`content_id`', 'I4' ),
- ),
-)),
+$gBitInstaller->registerPackageUpgrade( $infoHash, array(
+
+ array( 'DATADICT' => array(
+ array( 'DROPTABLE' => array(
+ 'test_table_1'
+ )),
+ array( 'CREATE' => array (
+ 'test_table_2' => "
+ test_col_1 C(32) PRIMARY,
+ test_col_2 C(64)
+ ",
+ )),
+ array( 'DROPTABLE' => array(
+ 'test_table_2'
+ )),
+ )),
));
-$gBitInstaller->registerPackageDependencies( WIKI_PKG_NAME, '1.0.3', array(
- 'kernel' => '0.0.2',
+$gBitInstaller->registerPackageDependencies( $infoHash, array(
+ 'kernel' => '0.0.2',
'liberty' => '0.1.1-beta',
));
?>