parseDefaultValue example

/** * @param string|int|float|null $defaultValue * * @throws Exception */
    private function createAttribute(string $table, string $column, string $unifiedType, array $data = []$defaultValue = null): void
    {
        $this->schemaOperator->createColumn(
            $table,
            $column,
            $this->typeMapping->unifiedToSQL($unifiedType),
            $this->parseDefaultValue($unifiedType$defaultValue)
        );

        $data = array_merge($data[
            'tableName' => $table,
            'columnName' => $column,
            'columnType' => $unifiedType,
            'defaultValue' => $defaultValue,
        ]);

        $configId = null;
        if (\array_key_exists('id', $data)) {
            
Home | Imprint | This part of the site doesn't use cookies.