diff --git a/config/alfresco/dbscripts/create/org.hibernate.dialect.MySQLInnoDBDialect/Schema-Reference-ACT.xml b/config/alfresco/dbscripts/create/org.hibernate.dialect.MySQLInnoDBDialect/Schema-Reference-ACT.xml
index dcc8e5bcc7..df7a01ea48 100644
--- a/config/alfresco/dbscripts/create/org.hibernate.dialect.MySQLInnoDBDialect/Schema-Reference-ACT.xml
+++ b/config/alfresco/dbscripts/create/org.hibernate.dialect.MySQLInnoDBDialect/Schema-Reference-ACT.xml
@@ -981,7 +981,7 @@
timestamp
- false
+ true
false
@@ -1676,7 +1676,7 @@
timestamp
- false
+ true
false
diff --git a/config/alfresco/dbscripts/db-schema-context.xml b/config/alfresco/dbscripts/db-schema-context.xml
index 94fffab14a..b51706e782 100644
--- a/config/alfresco/dbscripts/db-schema-context.xml
+++ b/config/alfresco/dbscripts/db-schema-context.xml
@@ -87,6 +87,7 @@
+
diff --git a/config/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.Dialect/update-activiti-default-timestamp-column.sql b/config/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.Dialect/update-activiti-default-timestamp-column.sql
new file mode 100644
index 0000000000..67f0e3cdab
--- /dev/null
+++ b/config/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.Dialect/update-activiti-default-timestamp-column.sql
@@ -0,0 +1,19 @@
+--
+-- Title: Update Activiti tables ACT_RE_DEPLOYMENT and ACT_RU_TASK with default timestamp value with NULL
+-- Database: Generic
+-- Since: V5.0 Schema 8034
+-- Author: Ramona Popa
+--
+-- Please contact support@alfresco.com if you need assistance with the upgrade.
+--
+
+-- Record script finish
+--
+DELETE FROM alf_applied_patch WHERE id = 'patch.db-V5.0-update-activiti-default-timestamp-column';
+INSERT INTO alf_applied_patch
+ (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
+ VALUES
+ (
+ 'patch.db-V5.0-update-activiti-default-timestamp-column', 'Manually executed script upgrade V5.0: Upgraded Activiti tables ACT_RE_DEPLOYMENT and ACT_RU_TASK for default timestamp value with NULL',
+ 0, 8033, -1, 8034, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
+ );
\ No newline at end of file
diff --git a/config/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.MySQLInnoDBDialect/update-activiti-default-timestamp-column.sql b/config/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.MySQLInnoDBDialect/update-activiti-default-timestamp-column.sql
new file mode 100644
index 0000000000..036790c0a6
--- /dev/null
+++ b/config/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.MySQLInnoDBDialect/update-activiti-default-timestamp-column.sql
@@ -0,0 +1,26 @@
+--
+-- Title: Update Activiti tables ACT_RE_DEPLOYMENT and ACT_RU_TASK with default timestamp value with NULL
+-- Database: MySQL InnoDB
+-- Since: V5.0 Schema 8034
+-- Author: Ramona Popa
+--
+-- Please contact support@alfresco.com if you need assistance with the upgrade.
+--
+
+alter table ACT_RE_DEPLOYMENT
+ MODIFY DEPLOY_TIME_ timestamp null;
+
+alter table ACT_RU_TASK
+ MODIFY CREATE_TIME_ timestamp null;
+
+--
+-- Record script finish
+--
+DELETE FROM alf_applied_patch WHERE id = 'patch.db-V5.0-update-activiti-default-timestamp-column';
+INSERT INTO alf_applied_patch
+ (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
+ VALUES
+ (
+ 'patch.db-V5.0-update-activiti-default-timestamp-column', 'Manually executed script upgrade V5.0: Upgraded Activiti tables ACT_RE_DEPLOYMENT and ACT_RU_TASK for default timestamp value with NULL',
+ 0, 8033, -1, 8034, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
+ );
\ No newline at end of file
diff --git a/config/alfresco/messages/patch-service.properties b/config/alfresco/messages/patch-service.properties
index 7e8f95a4d5..2eb6e7f132 100644
--- a/config/alfresco/messages/patch-service.properties
+++ b/config/alfresco/messages/patch-service.properties
@@ -199,9 +199,7 @@ patch.personUsagePatch.description=Add person 'cm:sizeCurrent' property (if miss
patch.redeployNominatedInvitationProcessWithPropsForShare.description=Redeploy nominated invitation workflow
patch.transferDefinitions.description=Add transfer definitions folder to data dictionary.
-
patch.redeployNominatedInvitationProcessWithPropsForShare.description=Redeploy nominated invitation workflow
-
patch.thumbnailsAssocQName.description=Update the 'cm:thumbnails' association QName to 'rn:rendition'.
patch.convertContentUrls.description=Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.
@@ -367,6 +365,8 @@ patch.db-V5.0-upgrade-to-activiti-5.16.4.description=Update Activiti tables from
patch.deleteClassifibleAspectForFailedThumbnail.description=Deletes 'cm:generalclassifiable' aspect and associated properties for nodes of 'cm:failedThumbnail' type
+patch.db-V5.0-update-activiti-default-timestamp-column.description=Update Activiti tables ACT_RE_DEPLOYMENT and ACT_RU_TASK with default timestamp value with NULL
+
patch.downloadsFolder=Adds the System Downloads folder
patch.downloadsFolder.description=Ensures the Syste Downloads folder exists.
patch.downloadsFolder.result.exists=The System Downloads folder already exists.
diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml
index 3f3e14e6e9..816c64d6fb 100644
--- a/config/alfresco/patch/patch-services-context.xml
+++ b/config/alfresco/patch/patch-services-context.xml
@@ -1259,4 +1259,15 @@
+
+
+
+
+
+
+
+
+ classpath:alfresco/dbscripts/upgrade/5.0/${db.script.dialect}/update-activiti-default-timestamp-column.sql
+
+
diff --git a/config/alfresco/version.properties b/config/alfresco/version.properties
index 3c407564a7..a73843ce9d 100644
--- a/config/alfresco/version.properties
+++ b/config/alfresco/version.properties
@@ -23,4 +23,4 @@ version.build=r@scm-revision@-b@build-number@
# Schema number
-version.schema=9022
+version.schema=9023
diff --git a/config/org/alfresco/repo/workflow/activiti/activiti.mysql.create.sql b/config/org/alfresco/repo/workflow/activiti/activiti.mysql.create.sql
index d3c8c4c3fd..e893eb9197 100644
--- a/config/org/alfresco/repo/workflow/activiti/activiti.mysql.create.sql
+++ b/config/org/alfresco/repo/workflow/activiti/activiti.mysql.create.sql
@@ -23,7 +23,7 @@ create table ACT_GE_BYTEARRAY (
create table ACT_RE_DEPLOYMENT (
ID_ varchar(255),
NAME_ varchar(255),
- DEPLOY_TIME_ timestamp,
+ DEPLOY_TIME_ timestamp NULL,
primary key (ID_)
) TYPE=InnoDB;
@@ -104,7 +104,7 @@ create table ACT_RU_TASK (
FORM_ varchar(255),
ASSIGNEE_ varchar(255),
PRIORITY_ integer,
- CREATE_TIME_ timestamp,
+ CREATE_TIME_ timestamp NULL,
START_DEADLINE_ timestamp,
COMPLETION_DEADLINE_ timestamp,
SKIPPABLE_ TINYINT,