diff --git a/src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlServerFhirModel.cs b/src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlServerFhirModel.cs index 7ac54d1071..7875bf44ca 100644 --- a/src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlServerFhirModel.cs +++ b/src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlServerFhirModel.cs @@ -456,11 +456,16 @@ private void ThrowIfNotInitialized() { ThrowIfCurrentSchemaVersionIsNull(); - if (_highestInitializedVersion < _schemaInformation.Current) + if (_highestInitializedVersion < _schemaInformation.MinimumSupportedVersion) { - _logger.LogError($"The {nameof(SqlServerFhirModel)} instance has not run the initialization required for the current schema version"); + _logger.LogError($"The {nameof(SqlServerFhirModel)} instance has not run the initialization required for minimum supported schema version"); throw new ServiceUnavailableException(); } + + if (_highestInitializedVersion < _schemaInformation.Current) + { + _logger.LogWarning($"The {nameof(SqlServerFhirModel)} instance has not run the initialization required for the current schema version"); + } } private void ThrowIfCurrentSchemaVersionIsNull()