Add NOP tasks for 4.3.0 to avoid migrator issues
This commit is contained in:
parent
7f12f80358
commit
034e878a6f
|
@ -0,0 +1,51 @@
|
|||
package ca.uhn.fhir.jpa.migrate.taskdef;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server - Migration
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2020 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
public class NopTask extends BaseTask {
|
||||
|
||||
public NopTask(String theProductVersion, String theSchemaVersion) {
|
||||
super(theProductVersion, theSchemaVersion);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate() {
|
||||
// nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doExecute() {
|
||||
// nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void generateHashCode(HashCodeBuilder theBuilder) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
// nothing
|
||||
}
|
||||
}
|
|
@ -59,9 +59,69 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|||
init400(); // 20190401 - 20190814
|
||||
init410(); // 20190815 - 20191014
|
||||
init420(); // 20191015 - 20200217
|
||||
init430(); // Replaced by 5.0.0
|
||||
init500(); // 20200218 - present
|
||||
}
|
||||
|
||||
/**
|
||||
* Partway through the 4.3.0 releaase cycle we renumbered to
|
||||
* 5.0.0 - We have a bunch of NOP tasks here to avoid breakage for anyone
|
||||
* who installed a prerelease before we made the switch
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void init430() {
|
||||
Builder version = forVersion(VersionEnum.V4_3_0);
|
||||
version.addNop("20200218.1");
|
||||
version.addNop("20200218.2");
|
||||
version.addNop("20200218.3");
|
||||
version.addNop("20200220.1");
|
||||
version.addNop("20200419.1");
|
||||
version.addNop("20200419.2");
|
||||
version.addNop("20200420.0");
|
||||
version.addNop("20200420.1");
|
||||
version.addNop("20200420.2");
|
||||
version.addNop("20200420.3");
|
||||
version.addNop("20200420.4");
|
||||
version.addNop("20200420.5");
|
||||
version.addNop("20200420.6");
|
||||
version.addNop("20200420.7");
|
||||
version.addNop("20200420.8");
|
||||
version.addNop("20200420.9");
|
||||
version.addNop("20200420.10");
|
||||
version.addNop("20200420.11");
|
||||
version.addNop("20200420.12");
|
||||
version.addNop("20200420.13");
|
||||
version.addNop("20200420.14");
|
||||
version.addNop("20200420.15");
|
||||
version.addNop("20200420.16");
|
||||
version.addNop("20200420.17");
|
||||
version.addNop("20200420.18");
|
||||
version.addNop("20200420.19");
|
||||
version.addNop("20200420.20");
|
||||
version.addNop("20200420.21");
|
||||
version.addNop("20200420.22");
|
||||
version.addNop("20200420.23");
|
||||
version.addNop("20200420.24");
|
||||
version.addNop("20200420.25");
|
||||
version.addNop("20200420.26");
|
||||
version.addNop("20200420.27");
|
||||
version.addNop("20200420.28");
|
||||
version.addNop("20200420.29");
|
||||
version.addNop("20200420.30");
|
||||
version.addNop("20200420.31");
|
||||
version.addNop("20200420.32");
|
||||
version.addNop("20200420.33");
|
||||
version.addNop("20200420.34");
|
||||
version.addNop("20200420.35");
|
||||
version.addNop("20200420.36");
|
||||
version.addNop("20200420.37");
|
||||
version.addNop("20200420.38");
|
||||
version.addNop("20200420.39");
|
||||
version.addNop("20200420.40");
|
||||
version.addNop("20200420.41");
|
||||
version.addNop("20200420.42");
|
||||
}
|
||||
|
||||
protected void init500() { // 20200218 - present
|
||||
Builder version = forVersion(VersionEnum.V5_0_0);
|
||||
|
||||
|
|
|
@ -96,7 +96,11 @@ public class Builder {
|
|||
addTask(task);
|
||||
}
|
||||
|
||||
public class BuilderAddTableRawSql {
|
||||
public void addNop(String theVersion) {
|
||||
addTask(new NopTask(myRelease, theVersion));
|
||||
}
|
||||
|
||||
public class BuilderAddTableRawSql {
|
||||
|
||||
private final AddTableRawSqlTask myTask;
|
||||
|
||||
|
|
Loading…
Reference in New Issue