diff options
author | liamfallon <liam.fallon@est.tech> | 2022-12-18 02:26:01 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-12-18 02:26:12 +0000 |
commit | 8cf623781404f98aeacfc44e1bc8a7f1bf8446ad (patch) | |
tree | 86e17db77294ef06029312ed1c7dafb4d682a157 /models-pdp | |
parent | d5c5893d3359ed5c31d79e41b25d19b5070152fb (diff) |
Upgrade the H2 database to the latest version
The latest verison of H2 does not allow colums called "user" or indexes
using an underscore in their name.
Issue-ID: POLICY-4488
Change-Id: I1db62768b0c0f85543c2f7d3681243f8386825e7
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-pdp')
3 files changed, 22 insertions, 21 deletions
diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpPolicyStatus.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpPolicyStatus.java index 536bb76a2..88fb14a90 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpPolicyStatus.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpPolicyStatus.java @@ -82,7 +82,7 @@ public class JpaPdpPolicyStatus extends PfConcept implements PfAuthorative<PdpPo @VerifyKey(versionNotNull = true) private PfConceptKey policyType; - @Column + @Column(columnDefinition = "TINYINT DEFAULT 1") private boolean deploy; @Column diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java index 45e63e404..7eb4e7c39 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java @@ -59,14 +59,15 @@ import org.onap.policy.models.base.Validated; import org.onap.policy.models.pdp.concepts.PdpEngineWorkerStatistics; import org.onap.policy.models.pdp.concepts.PdpStatistics; - /** * Class to represent a PDP statistics in the database. * */ @Entity @Table(name = "PdpStatistics") -@Index(name = "IDX_TSIDX1", columnNames = {"timeStamp", "name", "version"}) +@Index(name = "IDXTSIDX1", columnNames = { + "timeStamp", "name", "version" +}) @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) @Data @AllArgsConstructor @@ -189,21 +190,21 @@ public class JpaPdpStatistics extends PfConcept implements PfAuthorative<PdpStat final JpaPdpStatistics other = (JpaPdpStatistics) otherConcept; return new CompareToBuilder() - .append(this.name, other.name) - .append(this.version, other.version) - .append(this.generatedId, other.generatedId) - .append(this.timeStamp, other.timeStamp) - .append(this.pdpGroupName, other.pdpGroupName) - .append(this.pdpSubGroupName, other.pdpSubGroupName) - .append(this.policyDeployCount, other.policyDeployCount) - .append(this.policyDeployFailCount, other.policyDeployFailCount) - .append(this.policyDeploySuccessCount, other.policyDeploySuccessCount) - .append(this.policyUndeployCount, other.policyUndeployCount) - .append(this.policyUndeployFailCount, other.policyUndeployFailCount) - .append(this.policyUndeploySuccessCount, other.policyUndeploySuccessCount) - .append(this.policyExecutedCount, other.policyExecutedCount) - .append(this.policyExecutedFailCount, other.policyExecutedFailCount) - .append(this.policyExecutedSuccessCount, other.policyExecutedSuccessCount).toComparison(); + .append(this.name, other.name) + .append(this.version, other.version) + .append(this.generatedId, other.generatedId) + .append(this.timeStamp, other.timeStamp) + .append(this.pdpGroupName, other.pdpGroupName) + .append(this.pdpSubGroupName, other.pdpSubGroupName) + .append(this.policyDeployCount, other.policyDeployCount) + .append(this.policyDeployFailCount, other.policyDeployFailCount) + .append(this.policyDeploySuccessCount, other.policyDeploySuccessCount) + .append(this.policyUndeployCount, other.policyUndeployCount) + .append(this.policyUndeployFailCount, other.policyUndeployFailCount) + .append(this.policyUndeploySuccessCount, other.policyUndeploySuccessCount) + .append(this.policyExecutedCount, other.policyExecutedCount) + .append(this.policyExecutedFailCount, other.policyExecutedFailCount) + .append(this.policyExecutedSuccessCount, other.policyExecutedSuccessCount).toComparison(); } @Override @@ -252,7 +253,7 @@ public class JpaPdpStatistics extends PfConcept implements PfAuthorative<PdpStat this.setPolicyExecutedFailCount(pdpStatistics.getPolicyExecutedFailCount()); this.setPolicyExecutedSuccessCount(pdpStatistics.getPolicyExecutedSuccessCount()); this.setEngineStats( - PfUtils.mapList(pdpStatistics.getEngineStats(), PdpEngineWorkerStatistics::new, null)); + PfUtils.mapList(pdpStatistics.getEngineStats(), PdpEngineWorkerStatistics::new, null)); } @Override diff --git a/models-pdp/src/test/resources/META-INF/persistence.xml b/models-pdp/src/test/resources/META-INF/persistence.xml index 65380642a..7d4e5896b 100644 --- a/models-pdp/src/test/resources/META-INF/persistence.xml +++ b/models-pdp/src/test/resources/META-INF/persistence.xml @@ -43,7 +43,7 @@ <property name="eclipselink.ddl-generation.output-mode" value="database" /> <property name="eclipselink.logging.level" value="INFO" /> - <property name="eclipselink.logging.level" value="ALL" /> + <!--property name="eclipselink.logging.level" value="ALL" /> <property name="eclipselink.logging.level.jpa" value="ALL" /> <property name="eclipselink.logging.level.ddl" value="ALL" /> <property name="eclipselink.logging.level.connection" value="ALL" /> @@ -52,7 +52,7 @@ <property name="eclipselink.logging.level.sequencing" value="ALL" /> <property name="eclipselink.logging.level.server" value="ALL" /> <property name="eclipselink.logging.level.query" value="ALL" /> - <property name="eclipselink.logging.level.properties" value="ALL" /> + <property name="eclipselink.logging.level.properties" value="ALL" /--> </properties> </persistence-unit> </persistence> |