-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
_processForeignKeys | Identifier name is too long #5046
Comments
In the first place, why would you name your table and/or fields too long? |
cause I can do it? |
I'm not trying to be rude or something. I'm asking a genuine question. If there exists a limitation of 64 characters then developers should be wary of that and try to limit their wordings of their used DB identifiers. |
Why more than 64 characters? |
Mysql Limit: https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html |
how the name of an index is generated by a method of a framework should check if the generated name is legal and possibly modify it to make it legal. there are several reasons why the limit can be reached:
the truth is that the naming of an index is arbitrary regardless of how the table and the field are named in many frameworks these names are not dynamically generated like on Forge but the developer can choose it. Maybe that's the right way to go |
@sandrocantagallo
And want to support Oracle #2487, too. |
Might be related to #5075 |
Oracle 12.1 is only 30 characters. |
Oracle 12.1 is only 30 bytes. |
This is not a bug. #5075 would resolve the issue. |
Describe the bug
using a table name and a fairly long column name exceeds the limit of 64 characters
CodeIgniter 4 version
"codeigniter4/framework": "^4"
vendor\codeigniter4\framework\system\Database\Forge.php
protected function _processForeignKeys
Line: 1298 -> $nameIndex = $table . '_' . $field . '_foreign';
Possible Fix:
The text was updated successfully, but these errors were encountered: