aboutsummaryrefslogtreecommitdiffstats
path: root/policy-db-migrator/src/main
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2024-10-25 12:00:08 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2024-10-25 11:05:23 +0000
commitb76949baa5dded6079825a7b8cf2d7a1345e6848 (patch)
treef19bcec685faf028d18badac0919f758c3bcf099 /policy-db-migrator/src/main
parentee4bbd9838dc2f75bbb635bd9ed9163c41b94143 (diff)
Fix lastMsg NPE in postgresql after db-migrator upgrade
Issue-ID: POLICY-5144 Change-Id: I12de545c552f7b4aa6b60f3a67935436cf3c0d38 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'policy-db-migrator/src/main')
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql2
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql
index e0cbb692..8ef33cbb 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone, ADD phase SMALLINT;
+ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now(), ADD phase SMALLINT;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql
index 2c8d382a..66313c04 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone;
+ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone DEFAULT Now();