MySQL stores the default value using the specified number of decimals so that when comparing the existing default value with the new default value, the same format should be used.
*/
abstract class AbstractDecimalDatabaseTableColumn extends AbstractDatabaseTableColumn implements IDecimalsDatabaseTableColumn {
use TDecimalsDatabaseTableColumn;
+
+ /**
+ * @inheritDoc
+ */
+ public function getDefaultValue() {
+ $defaultValue = parent::getDefaultValue();
+ if ($defaultValue === null) {
+ return $defaultValue;
+ }
+
+ return number_format($defaultValue, $this->getDecimals() ?? 0, '.', '');
+ }
}