Generates column specification for ALTER syntax
public static generateAlter ( string $oldcol, string $newcol, string $type, string $length, string $attribute, string $collation, boolean | string $null, string $default_type, string $default_value, string $extra, string $comment, string $virtuality, string $expression, string $move_to ) : string | ||
$oldcol | string | old column name |
$newcol | string | new column name |
$type | string | type ('INT', 'VARCHAR', 'BIT', ...) |
$length | string | length ('2', '5,2', '', ...) |
$attribute | string | attribute |
$collation | string | collation |
$null | boolean | string | with 'NULL' or 'NOT NULL' |
$default_type | string | whether default is CURRENT_TIMESTAMP, NULL, NONE, USER_DEFINED |
$default_value | string | default value for USER_DEFINED default type |
$extra | string | 'AUTO_INCREMENT' |
$comment | string | field comment |
$virtuality | string | virtuality of the column |
$expression | string | expression for the virtual column |
$move_to | string | new position for column |
return | string | field specification |