Skip to content

Commit

Permalink
Merge pull request #2448 from IBM/tbieste-issue-2445
Browse files Browse the repository at this point in the history
Issue #2445 - Log warning messages about deprecated tables
  • Loading branch information
tbieste committed Jun 3, 2021
2 parents b0bbdcf + 3b209c2 commit da32223
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ protected void updateSchema() {

// perform any updates we need related to the V0010 schema change (IS_DELETED flag)
applyDataMigrationForV0010();

// Log warning messages that unused tables will be removed in a future release.
// TODO: This will no longer be needed after the tables are removed (https://github.com/IBM/FHIR/issues/713).
logWarningMessagesForDeprecatedTables();
}

/**
Expand Down Expand Up @@ -1863,6 +1867,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 da32223

Please sign in to comment.