Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenameColumn generating SQL syntax #2269

Closed
AlexanderSchaller opened this issue Mar 30, 2024 · 0 comments · Fixed by #2275
Closed

RenameColumn generating SQL syntax #2269

AlexanderSchaller opened this issue Mar 30, 2024 · 0 comments · Fixed by #2275

Comments

@AlexanderSchaller
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant