From 03625583f73a5209a691d20717153acf9176f7ab Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 19 Jan 2023 17:09:01 -0600 Subject: [PATCH] Change egw_notificationpopup.notify_message to longtext to avoid error: Data too long for column --- notifications/setup/setup.inc.php | 4 ++-- notifications/setup/tables_current.inc.php | 2 +- notifications/setup/tables_update.inc.php | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/notifications/setup/setup.inc.php b/notifications/setup/setup.inc.php index 609b345469..b4928d4364 100644 --- a/notifications/setup/setup.inc.php +++ b/notifications/setup/setup.inc.php @@ -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; @@ -39,4 +39,4 @@ $setup_info[NOTIFICATION_APP]['hooks']['config'] = 'notifications.notifications. $setup_info[NOTIFICATION_APP]['depends'][] = array( 'appname' => 'api', 'versions' => Array('21.1') -); +); \ No newline at end of file diff --git a/notifications/setup/tables_current.inc.php b/notifications/setup/tables_current.inc.php index 75339bd937..610bdfe7cd 100644 --- a/notifications/setup/tables_current.inc.php +++ b/notifications/setup/tables_current.inc.php @@ -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'), diff --git a/notifications/setup/tables_update.inc.php b/notifications/setup/tables_update.inc.php index 71d80ff7f2..ccf1ff69dc 100644 --- a/notifications/setup/tables_update.inc.php +++ b/notifications/setup/tables_update.inc.php @@ -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'; +} \ No newline at end of file