Skip to content

Commit

Permalink
Issue #2445 - Log warning messages about deprecated tables
Browse files Browse the repository at this point in the history
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
  • Loading branch information
tbieste committed Jun 9, 2021
1 parent e5404a1 commit 68b41c6
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ protected void updateSchema() {
PhysicalDataModel pdm = new PhysicalDataModel();
buildCommonModel(pdm, updateFhirSchema, updateOauthSchema,updateJavaBatchSchema);

// TODO: Temporary for release 4.9.0, add warning that unused tables will be removed in a future release
logWarningMessagesForDeprecatedTables();

// The objects are applied in parallel, which relies on each object
// expressing its dependencies correctly. Changes are only applied
// if their version is greater than the current version.
Expand Down Expand Up @@ -1978,6 +1981,20 @@ protected void logStatusMessage(int status) {
}
}

/**
* Log warning messages for deprecated tables.
*/
private void logWarningMessagesForDeprecatedTables() {
List<String> deprecatedTables = Arrays.asList(
"DOMAINRESOURCE_DATE_VALUES", "DOMAINRESOURCE_LATLNG_VALUES", "DOMAINRESOURCE_LOGICAL_RESOURCES", "DOMAINRESOURCE_NUMBER_VALUES",
"DOMAINRESOURCE_QUANTITY_VALUES", "DOMAINRESOURCE_RESOURCE_TOKEN_REFS", "DOMAINRESOURCE_RESOURCES","DOMAINRESOURCE_STR_VALUES",
"RESOURCE_DATE_VALUES", "RESOURCE_LATLNG_VALUES", "RESOURCE_LOGICAL_RESOURCES", "RESOURCE_NUMBER_VALUES",
"RESOURCE_QUANTITY_VALUES", "RESOURCE_RESOURCE_TOKEN_REFS", "RESOURCE_RESOURCES", "RESOURCE_STR_VALUES");
for (String deprecatedTable : deprecatedTables) {
logger.warning("Table '" + deprecatedTable + "' will be dropped in a future release. No data should be written to this table. If any data exists in the table, that data should be deleted.");
}
}

/**
* Main entry point
*
Expand Down

0 comments on commit 68b41c6

Please sign in to comment.