Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter… (#3551)
* Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/328
* Update HapiFhirJpaMigrationTasks.java
Corrected ordering
* Update HapiFhirJpaMigrationTasks.java
Moving index status to be last operation
* Revert "Update HapiFhirJpaMigrationTasks.java"
This reverts commit 37bfd3e66e
.
* Moved to bottom
Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>
This commit is contained in:
parent
d6702f956b
commit
eb4732a59e
|
@ -378,6 +378,14 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
||||||
version.executeRawSql("20220429.9", addTagDefConstraint);
|
version.executeRawSql("20220429.9", addTagDefConstraint);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/328
|
||||||
|
version.onTable("NPM_PACKAGE_VER")
|
||||||
|
.modifyColumn("20220501.1","FHIR_VERSION_ID").nonNullable().withType(ColumnTypeEnum.STRING, 20);
|
||||||
|
|
||||||
|
version.onTable("NPM_PACKAGE_VER_RES")
|
||||||
|
.modifyColumn("20220501.2","FHIR_VERSION_ID").nonNullable().withType(ColumnTypeEnum.STRING, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,6 +56,7 @@ public class NpmPackageVersionEntity {
|
||||||
public static final int VERSION_ID_LENGTH = 200;
|
public static final int VERSION_ID_LENGTH = 200;
|
||||||
public static final int PACKAGE_DESC_LENGTH = 200;
|
public static final int PACKAGE_DESC_LENGTH = 200;
|
||||||
public static final int FHIR_VERSION_LENGTH = 10;
|
public static final int FHIR_VERSION_LENGTH = 10;
|
||||||
|
public static final int FHIR_VERSION_ID_LENGTH = 20;
|
||||||
|
|
||||||
@SequenceGenerator(name = "SEQ_NPM_PACKVER", sequenceName = "SEQ_NPM_PACKVER")
|
@SequenceGenerator(name = "SEQ_NPM_PACKVER", sequenceName = "SEQ_NPM_PACKVER")
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_NPM_PACKVER")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_NPM_PACKVER")
|
||||||
|
@ -81,7 +82,7 @@ public class NpmPackageVersionEntity {
|
||||||
private String myDescriptionUpper;
|
private String myDescriptionUpper;
|
||||||
@Column(name = "CURRENT_VERSION", nullable = false)
|
@Column(name = "CURRENT_VERSION", nullable = false)
|
||||||
private boolean myCurrentVersion;
|
private boolean myCurrentVersion;
|
||||||
@Column(name = "FHIR_VERSION_ID", length = NpmPackageVersionEntity.FHIR_VERSION_LENGTH, nullable = false)
|
@Column(name = "FHIR_VERSION_ID", length = NpmPackageVersionEntity.FHIR_VERSION_ID_LENGTH, nullable = false)
|
||||||
private String myFhirVersionId;
|
private String myFhirVersionId;
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "FHIR_VERSION", length = NpmPackageVersionEntity.FHIR_VERSION_LENGTH, nullable = false)
|
@Column(name = "FHIR_VERSION", length = NpmPackageVersionEntity.FHIR_VERSION_LENGTH, nullable = false)
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class NpmPackageVersionResourceEntity {
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "FHIR_VERSION", length = NpmPackageVersionEntity.FHIR_VERSION_LENGTH, nullable = false)
|
@Column(name = "FHIR_VERSION", length = NpmPackageVersionEntity.FHIR_VERSION_LENGTH, nullable = false)
|
||||||
private FhirVersionEnum myFhirVersion;
|
private FhirVersionEnum myFhirVersion;
|
||||||
@Column(name = "FHIR_VERSION_ID", length = NpmPackageVersionEntity.FHIR_VERSION_LENGTH, nullable = false)
|
@Column(name = "FHIR_VERSION_ID", length = NpmPackageVersionEntity.FHIR_VERSION_ID_LENGTH, nullable = false)
|
||||||
private String myFhirVersionId;
|
private String myFhirVersionId;
|
||||||
@Column(name = "RES_SIZE_BYTES", nullable = false)
|
@Column(name = "RES_SIZE_BYTES", nullable = false)
|
||||||
private long myResSizeBytes;
|
private long myResSizeBytes;
|
||||||
|
|
Loading…
Reference in New Issue