diff --git a/core/modules/field/field.install b/core/modules/field/field.install index dd1e8cea02ea43c8f5c55af454ad560388a19a95..6e59f4c12e9212132886b59aebdafe47b98dc9bf 100644 --- a/core/modules/field/field.install +++ b/core/modules/field/field.install @@ -42,9 +42,12 @@ function field_update_10001() { // Set the new scale value: $newScaleValue = $scaleValue > $castedInitialPrecisionValue ? $castedInitialPrecisionValue : $scaleValue; - // Set the new precision and scale values and save the entity: - $decimalFieldStorageEntity->setSetting('precision', $newPrecisionValue); - $decimalFieldStorageEntity->setSetting('scale', $newScaleValue); - $decimalFieldStorageEntity->save(); + // Set the new precision and scale values if they changed: + if ($precisionValue != $newPrecisionValue || $scaleValue != $newScaleValue) { + $decimalFieldStorageEntity->setSetting('precision', $newPrecisionValue); + $decimalFieldStorageEntity->setSetting('scale', $newScaleValue); + $decimalFieldStorageEntity->save(); + } + } }