Add special case for mysql 3.22.X if we can detect the server version (php4)

This commit is contained in:
Miles Lott 2002-03-21 02:15:45 +00:00
parent 1e1fd8efe1
commit 7ac912a218
2 changed files with 30 additions and 1 deletions

View File

@ -350,6 +350,22 @@
'ix' => array(),
'uc' => array()
)
);
/* Try to fix this unfortunate case for mysql 3.22.X in php4 at least */
if(floor(phpversion()) == 4 && @$GLOBALS['phpgw_setup']->db->Type == 'mysql')
{
$_ver_str = @mysql_get_server_info();
$_ver_arr = explode(".",$_ver_str);
$_ver = $_ver_arr[1];
if(intval($_ver) < 23)
{
$phpgw_baseline['phpgw_lang']['fd']['message_id'] = array(
'type' => 'varchar',
'precision' => 150,
'nullable' => false,
'default' => ''
);
}
}
?>

View File

@ -364,6 +364,19 @@
$test[] = '0.9.13.015';
function phpgwapi_upgrade0_9_13_015()
{
/* Skip this for mysql 3.22.X in php4 at least */
if(floor(phpversion()) == 4 && @$GLOBALS['phpgw_setup']->db->Type == 'mysql')
{
$_ver_str = @mysql_get_server_info();
$_ver_arr = explode(".",$_ver_str);
$_ver = $_ver_arr[1];
if(intval($_ver) < 23)
{
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.016';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}
}
$GLOBALS['phpgw_setup']->oProc->AlterColumn(
'lang',
'message_id',