changeColumn example

/** * @param string $table * @param string $name * @param string $type * * @return void */
    public function update($table$name$type)
    {
        if ($this->get($table$name) !== null) {
            $this->changeColumn($table$name$type);

            return;
        }

        $this->createColumn($table$name$type);
    }

    /** * @param string $table * @param string $keyColumn * * @return void */
$schemaChanged = $this->schemaChanged(
            $config,
            $newColumnName,
            $unifiedType,
            $defaultValue
        );

        if (!$schemaChanged) {
            return;
        }

        $this->schemaOperator->changeColumn(
            $config->getTableName(),
            $originalColumnName,
            $newColumnName,
            $this->typeMapping->unifiedToSQL($unifiedType),
            $this->parseDefaultValue($unifiedType$defaultValue)
        );
    }

    /** * @param string|int|float|null $defaultValue * * @return string|int|float */
Home | Imprint | This part of the site doesn't use cookies.