diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index c1362b6205..f59c2758f9 100755 --- a/phpgwapi/setup/setup.inc.php +++ b/phpgwapi/setup/setup.inc.php @@ -14,7 +14,7 @@ /* Basic information about this app */ $setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'API'; - $setup_info['phpgwapi']['version'] = '1.0.1.020'; + $setup_info['phpgwapi']['version'] = '1.0.1.021'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -80,3 +80,4 @@ + diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index f4bdf114f9..7e6fe08019 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -801,4 +801,23 @@ $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.020'; return $GLOBALS['setup_info']['phpgwapi']['currentver']; } + + + $test[] = '1.0.1.020'; + function phpgwapi_upgrade1_0_1_020() + { + // in some old installations the email_type is NOT NULL, contrary to what our tables_current says + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_addressbook','email_type',array( + 'type' => 'varchar', + 'precision' => '32', + 'default' => 'INTERNET' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_addressbook','email_home_type',array( + 'type' => 'varchar', + 'precision' => '32', + 'default' => 'INTERNET' + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.021'; + } ?>