Cake\Database\Schema\SqliteSchema::_defaultValue PHP Method

_defaultValue() protected method

Sqlite includes quotes and bared NULLs in default values. We need to remove those.
protected _defaultValue ( string | null $default ) : string | null
$default string | null The default value.
return string | null
    protected function _defaultValue($default)
    {
        if ($default === 'NULL') {
            return null;
        }
        // Remove quotes
        if (preg_match("/^'(.*)'\$/", $default, $matches)) {
            return str_replace("''", "'", $matches[1]);
        }
        return $default;
    }