diff options
| author | Daniel Sutcliffe <dansut@users.sourceforge.net> | 2009-03-31 16:05:43 +0000 |
|---|---|---|
| committer | Daniel Sutcliffe <dansut@users.sourceforge.net> | 2009-03-31 16:05:43 +0000 |
| commit | 9e645d5d38a6387957131b975c4f570ad3257dfd (patch) | |
| tree | b17840a23defb26e22234f4bf196313786f01105 /admin | |
| parent | 726e75e8a22b743470099e4170764fdfb3938067 (diff) | |
| download | liberty-9e645d5d38a6387957131b975c4f570ad3257dfd.tar.gz liberty-9e645d5d38a6387957131b975c4f570ad3257dfd.tar.bz2 liberty-9e645d5d38a6387957131b975c4f570ad3257dfd.zip | |
Fix MySQL upgrades for ip/IPv6 column upgrades
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/upgrades/2.1.3.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/admin/upgrades/2.1.3.php b/admin/upgrades/2.1.3.php index e3ae654..725f5b5 100644 --- a/admin/upgrades/2.1.3.php +++ b/admin/upgrades/2.1.3.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_liberty/admin/upgrades/2.1.3.php,v 1.2 2009/03/25 08:28:11 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/admin/upgrades/2.1.3.php,v 1.3 2009/03/31 16:05:43 dansut Exp $ */ global $gBitInstaller; @@ -11,14 +11,10 @@ $infoHash = array( 'post_upgrade' => NULL, ); -// all we are doing is change the column type of user_id for liberty_content_history. -// postgresql < 8.2 doesn't allow easy column type changing -// and therefore we need to undergo this annoying dance. +// Increase the size of the IP column to cope with IPv6 $gBitInstaller->registerPackageUpgrade( $infoHash, array( -// copy data into new column array( 'QUERY' => - // postgres > 8.2 needs to have the type cast array( 'PGSQL' => array( "ALTER TABLE `".BIT_DB_PREFIX."liberty_content` ALTER `ip` TYPE VARCHAR(39)", @@ -26,14 +22,14 @@ array( 'QUERY' => "ALTER TABLE `".BIT_DB_PREFIX."liberty_action_log` ALTER `ip` TYPE VARCHAR(39)", ), 'OCI' => array( - "ALTER TABLE `".BIT_DB_PREFIX."liberty_content MODIFY (`ip` TYPE VARCHAR2(39))", + "ALTER TABLE `".BIT_DB_PREFIX."liberty_content` MODIFY (`ip` TYPE VARCHAR2(39))", "ALTER TABLE `".BIT_DB_PREFIX."liberty_content_history` MODIFY (`ip` TYPE VARCHAR2(39))", "ALTER TABLE `".BIT_DB_PREFIX."liberty_action_log` MODIFY (`ip` TYPE VARCHAR2(39))", ), 'MYSQL' => array( - "ALTER TABLE `".BIT_DB_PREFIX."liberty_content MODIFY `ip` TYPE VARCHAR(39)", - "ALTER TABLE `".BIT_DB_PREFIX."liberty_content_history` MODIFY `ip` TYPE VARCHAR(39)", - "ALTER TABLE `".BIT_DB_PREFIX."liberty_action_log` MODIFY `ip` TYPE VARCHAR(39)", + "ALTER TABLE `".BIT_DB_PREFIX."liberty_content` MODIFY `ip` VARCHAR(39)", + "ALTER TABLE `".BIT_DB_PREFIX."liberty_content_history` MODIFY `ip` VARCHAR(39)", + "ALTER TABLE `".BIT_DB_PREFIX."liberty_action_log` MODIFY `ip` VARCHAR(39)", ), ), ), |
