fixed not working empty default for phpgw_cal_user's cal_type, it's now 'u'

This commit is contained in:
Ralf Becker 2003-09-25 02:00:26 +00:00
parent 0d41ea8765
commit bc05713de1
3 changed files with 19 additions and 2 deletions

View File

@ -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 @@

View File

@ -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(),

View File

@ -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'];
}
?>