Skip to content

RenameColumn generating SQL syntax #2269

@AlexanderSchaller

Description

@AlexanderSchaller

Using phinx version 0.16.0. Using the mysql adapter.

Code example:

$table = $this->table('trades');
$table
    ->renameColumn('uid_a', 'initiatorUserId')
    ->update();

The resulting SQL command is:

ALTER TABLE `trades` CHANGE COLUMN `uid_a` `initiatorUserId` int NOT NULLAUTO_INCREMENT COMMENT ''

With the issue of course being (lack of space between NULL and AUTO_INCREMENT)

NOT NULLAUTO_INCREMENT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions