diff --git a/classes/fields/number.php b/classes/fields/number.php index 6d33e0a4e5..60999cf2b3 100644 --- a/classes/fields/number.php +++ b/classes/fields/number.php @@ -157,6 +157,10 @@ public function schema( $options = null ) { $schema = 'DECIMAL(' . $length . ',' . $decimals . ')'; + if ( 1 === (int) pods_v( static::$type . '_keep_leading_zeroes', $options, 255 ) ) { + $schema = 'VARCHAR(' . $length . ')'; + } + return $schema; }