Package ca.uhn.fhir.jpa.migrate
Class SchemaMigrator
java.lang.Object
ca.uhn.fhir.jpa.migrate.SchemaMigrator
The SchemaMigrator class is responsible for managing and executing database schema migrations during standard bootup.
It provides methods to validate the schema version and migrate the schema if necessary.
This supports all the configuation needed to run via the CLI or via a bootup migrator. Specifically
1. Dry Run
2. Enable Heavyweight Tasks
3. Task Skipping
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSchemaMigrator(String theSchemaName, String theMigrationTableName, DataSource theDataSource, boolean theEnableHeavyweighTtasks, String theMigrationTasksToSkip, boolean theDryRun, Properties jpaProperties, MigrationTaskList theMigrationTasks, HapiMigrationStorageSvc theHapiMigrationStorageSvc) ConstructorSchemaMigrator(String theSchemaName, String theMigrationTableName, DataSource theDataSource, Properties jpaProperties, MigrationTaskList theMigrationTasks, HapiMigrationStorageSvc theHapiMigrationStorageSvc) Temporary Dummy Constructor to remove once CDR side merges. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmigrate()voidsetCallbacks(List<IHapiMigrationCallback> theCallbacks) voidsetDriverType(DriverTypeEnum theDriverType) voidvalidate()
-
Field Details
-
HAPI_FHIR_MIGRATION_TABLENAME
- See Also:
-
-
Constructor Details
-
SchemaMigrator
public SchemaMigrator(String theSchemaName, String theMigrationTableName, DataSource theDataSource, boolean theEnableHeavyweighTtasks, String theMigrationTasksToSkip, boolean theDryRun, Properties jpaProperties, MigrationTaskList theMigrationTasks, HapiMigrationStorageSvc theHapiMigrationStorageSvc) Constructor -
SchemaMigrator
public SchemaMigrator(String theSchemaName, String theMigrationTableName, DataSource theDataSource, Properties jpaProperties, MigrationTaskList theMigrationTasks, HapiMigrationStorageSvc theHapiMigrationStorageSvc) Temporary Dummy Constructor to remove once CDR side merges.
-
-
Method Details
-
validate
-
migrate
-
setDriverType
-
setCallbacks
-
createMigrationTableIfRequired
-