Cake\Database\Schema\PostgresSchema::_defaultValue PHP Метод

_defaultValue() защищенный Метод

Postgres includes sequence data and casting information in default values. We need to remove those.
protected _defaultValue ( string | null $default ) : string | null
$default string | null The default value.
Результат string | null
    protected function _defaultValue($default)
    {
        if (is_numeric($default) || $default === null) {
            return $default;
        }
        // Sequences
        if (strpos($default, 'nextval') === 0) {
            return null;
        }
        // Remove quotes and postgres casts
        return preg_replace("/^'(.*)'(?:::.*)\$/", "\$1", $default);
    }