From 154f5dc4cc60d6a91f0f99c8d4827ab8d29481bd Mon Sep 17 00:00:00 2001 From: dheeyi william Date: Thu, 4 May 2017 14:36:19 -0400 Subject: [PATCH] HOR-3177 MySQL Exception in APP when the Mobile Notifications are enabled in env.ini --- .../model/map/NotificationDeviceMapBuilder.php | 2 +- .../classes/model/om/BaseNotificationDevice.php | 4 ++-- workflow/engine/config/schema.xml | 11 ++++++++++- workflow/engine/data/mysql/schema.sql | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/workflow/engine/classes/model/map/NotificationDeviceMapBuilder.php b/workflow/engine/classes/model/map/NotificationDeviceMapBuilder.php index 97a2a9823..ce26120b7 100644 --- a/workflow/engine/classes/model/map/NotificationDeviceMapBuilder.php +++ b/workflow/engine/classes/model/map/NotificationDeviceMapBuilder.php @@ -71,7 +71,7 @@ class NotificationDeviceMapBuilder $tMap->addColumn('SYS_LANG', 'SysLang', 'string', CreoleTypes::VARCHAR, false, 10); - $tMap->addColumn('DEV_REG_ID', 'DevRegId', 'string', CreoleTypes::VARCHAR, true, 150); + $tMap->addColumn('DEV_REG_ID', 'DevRegId', 'string', CreoleTypes::LONGVARCHAR, true, null); $tMap->addColumn('DEV_TYPE', 'DevType', 'string', CreoleTypes::VARCHAR, true, 50); diff --git a/workflow/engine/classes/model/om/BaseNotificationDevice.php b/workflow/engine/classes/model/om/BaseNotificationDevice.php index 56a8f3bb4..2f33fbf7b 100644 --- a/workflow/engine/classes/model/om/BaseNotificationDevice.php +++ b/workflow/engine/classes/model/om/BaseNotificationDevice.php @@ -49,7 +49,7 @@ abstract class BaseNotificationDevice extends BaseObject implements Persistent * The value for the dev_reg_id field. * @var string */ - protected $dev_reg_id = ''; + protected $dev_reg_id; /** * The value for the dev_type field. @@ -283,7 +283,7 @@ abstract class BaseNotificationDevice extends BaseObject implements Persistent $v = (string) $v; } - if ($this->dev_reg_id !== $v || $v === '') { + if ($this->dev_reg_id !== $v) { $this->dev_reg_id = $v; $this->modifiedColumns[] = NotificationDevicePeer::DEV_REG_ID; } diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index 3e16c46f2..64ce0a367 100644 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -5543,7 +5543,16 @@ - + + + + + + + + + + diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql index 7a4bfe380..6a6b4a9e5 100644 --- a/workflow/engine/data/mysql/schema.sql +++ b/workflow/engine/data/mysql/schema.sql @@ -3077,7 +3077,7 @@ CREATE TABLE `NOTIFICATION_DEVICE` `DEV_UID` VARCHAR(32) default '' NOT NULL, `USR_UID` VARCHAR(32) default '' NOT NULL, `SYS_LANG` VARCHAR(10) default '', - `DEV_REG_ID` VARCHAR(150) default '' NOT NULL, + `DEV_REG_ID` MEDIUMTEXT default '' NOT NULL, `DEV_TYPE` VARCHAR(50) default '' NOT NULL, `DEV_CREATE` DATETIME NOT NULL, `DEV_UPDATE` DATETIME NOT NULL,