aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2024-10-22 14:13:39 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2024-10-24 10:22:04 +0000
commitee4bbd9838dc2f75bbb635bd9ed9163c41b94143 (patch)
tree1807ed146cf2bd4dd780dccc15026343918e9b4b
parent1af90e40405ab7d9ef8b01468902155f33cb6db1 (diff)
Fix lastMsg NPE after db-migrator upgrade
Issue-ID: POLICY-5144 Change-Id: I2fa81530ce23c5eac38f223cf64c2a16cdedaafa Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0100-automationcomposition.sql2
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0200-automationcompositiondefinition.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0100-automationcomposition.sql
index 933e4bda..103a616c 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0100-automationcomposition.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0100-automationcomposition.sql
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE automationcomposition ADD lastMsg datetime(6), ADD phase TINYINT;
+ALTER TABLE automationcomposition ADD lastMsg datetime(6) DEFAULT Now(), ADD phase TINYINT;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0200-automationcompositiondefinition.sql
index 0f0af093..5a0c05ad 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0200-automationcompositiondefinition.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0200-automationcompositiondefinition.sql
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE automationcompositiondefinition ADD lastMsg datetime(6);
+ALTER TABLE automationcompositiondefinition ADD lastMsg datetime(6) DEFAULT Now();