Class Builder.BuilderWithTableName
java.lang.Object
ca.uhn.fhir.jpa.migrate.tasks.api.Builder.BuilderWithTableName
- All Implemented Interfaces:
BaseMigrationTasks.IAcceptsTasks
- Direct Known Subclasses:
Builder.BuilderAddTableByColumns
- Enclosing class:
- Builder
public static class Builder.BuilderWithTableName
extends Object
implements BaseMigrationTasks.IAcceptsTasks
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassclass -
Constructor Summary
ConstructorsConstructorDescriptionBuilderWithTableName(String theRelease, BaseMigrationTasks.IAcceptsTasks theSink, String theTableName) -
Method Summary
Modifier and TypeMethodDescriptionaddForeignKey(String theVersion, String theForeignKeyName) voiddropColumn(String theVersion, String theColumnName) voiddropForeignKey(String theVersion, String theFkName, String theParentTableName) voiddropIndexStub(String theVersion, String theIndexName) voiddropThisTable(String theVersion) voidmigratePostgresTextClobToBinaryClob(String theVersion, String theColumnName) modifyColumn(String theVersion, String theColumnName) renameColumn(String theVersion, String theOldName, String theNewName) renameColumn(String theVersion, String theOldName, String theNewName, boolean isOkayIfNeitherColumnExists, boolean theDeleteTargetColumnFirstIfBothExist) voidrenameIndex(String theVersion, String theOldIndexName, String theNewIndexName) Deprecated.Do not rename indexes - It is too hard to figure out what happened if something goes wrongvoidrenameIndexStub(String theVersion, String theOldIndexName, String theNewIndexName) Deprecated.Do not rename indexes - It is too hard to figure out what happened if something goes wrong
-
Constructor Details
-
BuilderWithTableName
public BuilderWithTableName(String theRelease, BaseMigrationTasks.IAcceptsTasks theSink, String theTableName)
-
-
Method Details
-
getTableName
-
dropIndex
-
dropIndexStub
-
renameIndex
@Deprecated public void renameIndex(String theVersion, String theOldIndexName, String theNewIndexName) Deprecated.Do not rename indexes - It is too hard to figure out what happened if something goes wrong -
renameIndexStub
Deprecated.Do not rename indexes - It is too hard to figure out what happened if something goes wrong -
dropThisTable
-
addIndex
public Builder.BuilderWithTableName.BuilderAddIndexWithName addIndex(String theVersion, String theIndexName) -
addColumn
public Builder.BuilderWithTableName.BuilderAddColumnWithName addColumn(String theVersion, String theColumnName) -
dropColumn
-
addTask
- Specified by:
addTaskin interfaceBaseMigrationTasks.IAcceptsTasks
-
modifyColumn
public Builder.BuilderWithTableName.BuilderModifyColumnWithName modifyColumn(String theVersion, String theColumnName) -
addForeignKey
public Builder.BuilderWithTableName.BuilderAddForeignKey addForeignKey(String theVersion, String theForeignKeyName) -
renameColumn
public Builder.BuilderWithTableName renameColumn(String theVersion, String theOldName, String theNewName) -
renameColumn
public Builder.BuilderWithTableName renameColumn(String theVersion, String theOldName, String theNewName, boolean isOkayIfNeitherColumnExists, boolean theDeleteTargetColumnFirstIfBothExist) - Parameters:
theOldName- The old column nametheNewName- The new column nameisOkayIfNeitherColumnExists- Setting this to true means that it's not an error if neither column existstheDeleteTargetColumnFirstIfBothExist- Setting this to true causes the migrator to be ok with the target column existing. It will make sure that there is no data in the column with the new name, then delete it if so in order to make room for the renamed column. If there is data it will still bomb out.
-
dropForeignKey
- Parameters:
theFkName- the name of the foreign keytheParentTableName- the name of the table that exports the foreign key
-
migratePostgresTextClobToBinaryClob
-