#33169 closed Bug (invalid)
Migrations crashes with long identifiers on MySQL. — at Version 5
Reported by: | Awais Qureshi | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 3.2 |
Severity: | Normal | Keywords: | django32, mysql8.0.26 |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I am trying to upgrade the project from django22 to 32.
Migrate command gives me this error
django.db.utils.OperationalError: (1059, "Identifier name 'blackboard_blackboardlearnerassessmentdatatransmissionaudit_chk_1' is too long")
I did't find any information related to this change in django32 release notes.
Important point: class BlackboardLearnerAssessmentDataTransmissionAudit(models.Model)
is model name and app name is blackboard
also.
Change History (5)
comment:1 by , 3 years ago
Resolution: | → needsinfo |
---|---|
Severity: | Release blocker → Normal |
Status: | new → closed |
Summary: | migrations fails to run on django32 with mysql5.7 → Migrations crashes with long identifiers on MySQL. |
Type: | Uncategorized → Bug |
comment:2 by , 3 years ago
I am using mysqlclient==2.0.3 and all django defaults packages/backends.
Yes I have checked django30 and 31 release notes, but no information available with this change. Same migration is working fine in django22.
blackboard_blackboardlearnerassessmentdatatransmissionaudit_chk_1
it has 65 characters but seems fine with django22.
comment:3 by , 3 years ago
... it has 65 characters but seems fine with django22.
This error is not raised by Django, but by MySQL. Can you provide a minimum project to reproduce?
comment:4 by , 3 years ago
Have you verified the model field referred to is still in your project? I can produce your error if I'm executing a previously written migration but where the field is no longer in my project. Instead, if the field is in my project, I get this upon migrate
:
SystemCheckError: System check identified some issues: ERRORS: x.xxxx: (models.E018) Autogenerated column name too long for field "blackboard_blackboardlearnerassessmentdatatransmissionaudit_chk_1". Maximum length is "64" for database "default". HINT: Set the column name manually using 'db_column'.
This system check predates 2.2, so if the field is in your project and no system check is raised, that would be a false negative to address. But we would need a minimal project to verify that the field exists.
comment:5 by , 3 years ago
Description: | modified (diff) |
---|
Thanks for this report, however I don't think you've explained the issue in enough detail to confirm a bug in Django.
blackboard_blackboardlearnerassessmentdatatransmissionaudit_chk_1
is longer than the maximum identifier name on MySQL. Are you using the built-in backend for MySQL? Can you provide a minimum project to reproduce?Have you checked release notes for Django 3.0 and 3.1?