From b76949baa5dded6079825a7b8cf2d7a1345e6848 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Fri, 25 Oct 2024 12:00:08 +0100 Subject: Fix lastMsg NPE in postgresql after db-migrator upgrade Issue-ID: POLICY-5144 Change-Id: I12de545c552f7b4aa6b60f3a67935436cf3c0d38 Signed-off-by: FrancescoFioraEst --- .../clampacm/postgres/1500/upgrade/0100-automationcomposition.sql | 2 +- .../postgres/1500/upgrade/0200-automationcompositiondefinition.sql | 2 +- 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(); -- cgit 1.2.3-korg