From 9a787b926c592de65dad6fda2622e7d0c130f6ff Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 12 Nov 2005 18:21:02 +0000 Subject: [PATCH] in some old installations the email_type is NOT NULL, contrary to what our tables_current says --- phpgwapi/setup/setup.inc.php | 3 ++- phpgwapi/setup/tables_update.inc.php | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) 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'; + } ?>