-
Notifications
You must be signed in to change notification settings - Fork 116
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
Migration issues in Cake5 #661
Comments
Why do you specify a limit on an integer column? But yes, the different column types are surely the problem here. I just don't have that issue because when we had that migrations change I already unified all my PK's and FK's to be unsigned int with no length/limit, therefore I can't reproduce this. |
The integer length shouldnt be relevant afaik. |
This was the behavior in CakePHP 4.x as well. Seemed like id columns needed to be unsigned and same length. Actually you can see the result of one such change here: #647 (comment) In this case we had "fake users" with user_id's negative but changing to unsigned broke that so the Migration above was to "fix that" in the tables. |
Closing in favor of more concrete ticket #667 |
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
CakePHP Version: 5.x
What you did
This used to work, now it throws
It seems this could be related to the unsigned issue/changes?
The primary key gets auto created as int(11) unsigned, the state_id as (int)10 signed.
I think the state_id should also be unsigned by default then unless specified otherwise.
Basically, defaulting integer columns to
The text was updated successfully, but these errors were encountered: