Change egw_notificationpopup.notify_message to longtext to avoid error: Data too long for column

This commit is contained in:
ralf 2023-01-19 17:09:01 -06:00
parent 48008f4e96
commit 03625583f7
3 changed files with 13 additions and 3 deletions

View File

@ -14,7 +14,7 @@ if (!defined('NOTIFICATION_APP'))
}
$setup_info[NOTIFICATION_APP]['name'] = NOTIFICATION_APP;
$setup_info[NOTIFICATION_APP]['version'] = '21.1';
$setup_info[NOTIFICATION_APP]['version'] = '23.1';
$setup_info[NOTIFICATION_APP]['app_order'] = 1;
$setup_info[NOTIFICATION_APP]['tables'] = array('egw_notificationpopup');
$setup_info[NOTIFICATION_APP]['enable'] = 2;

View File

@ -14,7 +14,7 @@ $phpgw_baseline = array(
'fd' => array(
'notify_id' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'),
'account_id' => array('type' => 'int','meta' => 'user','precision' => '20','nullable' => False,'comment' => 'user to notify'),
'notify_message' => array('type' => 'text', 'comment' => 'notification message'),
'notify_message' => array('type' => 'longtext','comment' => 'notification message'),
'notify_created' => array('type' => 'timestamp','meta' => 'timestamp','default' => 'current_timestamp','comment' => 'creation time of notification'),
'notify_type' => array('type' => 'ascii','precision' => '32','comment' => 'notification type'),
'notify_status' => array('type' => 'varchar','precision' => '32','comment' => 'notification status'),

View File

@ -192,3 +192,13 @@ function notifications_upgrade20_1()
{
return $GLOBALS['setup_info']['notifications']['currentver'] = '21.1';
}
function notifications_upgrade21_1()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','notify_message',array(
'type' => 'longtext',
'comment' => 'notification message'
));
return $GLOBALS['setup_info']['notifications']['currentver'] = '23.1';
}