mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 11:58:24 +01:00
* Calendar: fix for failed 1.9.006 update: PostgreSQL needs temporary a nullable range_start column, to not stall on broken events without dates
This commit is contained in:
parent
8d93aac83f
commit
ec2f7879d4
@ -2162,11 +2162,11 @@ function calendar_upgrade1_9_005()
|
|||||||
*/
|
*/
|
||||||
function calendar_upgrade1_9_006()
|
function calendar_upgrade1_9_006()
|
||||||
{
|
{
|
||||||
|
// PostgreSQL needs temporary a nullable column, to not stall on broken events without dates!
|
||||||
|
// We add that constrain in 1.9.007, after deleting all rows with range_start=0 OR range_start IS NULL
|
||||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_cal','range_start',array(
|
$GLOBALS['egw_setup']->oProc->AddColumn('egw_cal','range_start',array(
|
||||||
'type' => 'int',
|
'type' => 'int',
|
||||||
'precision' => '8',
|
'precision' => '8',
|
||||||
'nullable' => False,
|
|
||||||
'default' => '0', // PostgreSQL needs a temporary default, to create a nullable column!
|
|
||||||
'comment' => 'startdate (of range)'
|
'comment' => 'startdate (of range)'
|
||||||
));
|
));
|
||||||
$GLOBALS['egw_setup']->db->query('UPDATE egw_cal SET range_start = (SELECT MIN(cal_start) FROM egw_cal_dates WHERE egw_cal_dates.cal_id=egw_cal.cal_id)', __LINE__, __FILE__);
|
$GLOBALS['egw_setup']->db->query('UPDATE egw_cal SET range_start = (SELECT MIN(cal_start) FROM egw_cal_dates WHERE egw_cal_dates.cal_id=egw_cal.cal_id)', __LINE__, __FILE__);
|
||||||
|
Loading…
Reference in New Issue
Block a user