From bc05713de1c2ceb4498c7c2d1df40f1ab62e7938 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 25 Sep 2003 02:00:26 +0000 Subject: [PATCH] fixed not working empty default for phpgw_cal_user's cal_type, it's now 'u' --- calendar/setup/setup.inc.php | 3 ++- calendar/setup/tables_current.inc.php | 2 +- calendar/setup/tables_update.inc.php | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/calendar/setup/setup.inc.php b/calendar/setup/setup.inc.php index d8f4a08048..5fc7cc1376 100755 --- a/calendar/setup/setup.inc.php +++ b/calendar/setup/setup.inc.php @@ -12,7 +12,7 @@ /* $Id$ */ $setup_info['calendar']['name'] = 'calendar'; - $setup_info['calendar']['version'] = '0.9.16.001'; + $setup_info['calendar']['version'] = '0.9.16.002'; $setup_info['calendar']['app_order'] = 3; $setup_info['calendar']['enable'] = 1; @@ -59,3 +59,4 @@ + diff --git a/calendar/setup/tables_current.inc.php b/calendar/setup/tables_current.inc.php index 610f2409d6..802babb4a4 100644 --- a/calendar/setup/tables_current.inc.php +++ b/calendar/setup/tables_current.inc.php @@ -71,7 +71,7 @@ 'cal_id' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), 'cal_login' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), 'cal_status' => array('type' => 'char','precision' => '1','nullable' => True,'default' => 'A'), - 'cal_type' => array('type' => 'varchar','precision' => '1','nullable' => False,'default' => '') + 'cal_type' => array('type' => 'varchar','precision' => '1','nullable' => False,'default' => 'u') ), 'pk' => array('cal_id','cal_login'), 'fk' => array(), diff --git a/calendar/setup/tables_update.inc.php b/calendar/setup/tables_update.inc.php index b92a23b282..db0c882b2a 100644 --- a/calendar/setup/tables_update.inc.php +++ b/calendar/setup/tables_update.inc.php @@ -942,4 +942,20 @@ $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.16.001'; return $GLOBALS['setup_info']['calendar']['currentver']; } + + + $test[] = '0.9.16.001'; + function calendar_upgrade0_9_16_001() + { + // this is to set the default as schema_proc was not setting an empty default + $GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_cal_user','cal_type',array( + 'type' => 'varchar', + 'precision' => '1', + 'nullable' => False, + 'default' => 'u' + )); + + $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.16.002'; + return $GLOBALS['setup_info']['calendar']['currentver']; + } ?>