Changes between Initial Version and Version 1 of Ticket #33169, comment 11


Ignore:
Timestamp:
Jan 24, 2022, 11:11:44 AM (2 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33169, comment 11

    initial v1  
    11It's not a django issue. as per mysql8.0 [https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html]
    22
    3 `For constraint definitions that include no constraint name, the server internally generates a name derived from the associated table name. For example, internally generated foreign key and CHECK constraint names consist of the table name plus _ibfk_ or _chk_ and a number. If the table name is close to the length limit for constraint names, the additional characters required for the constraint name may cause that name to exceed the limit, resulting in an error.`
     3> For constraint definitions that include no constraint name, the server internally generates a name derived from the associated table name. For example, internally generated foreign key and CHECK constraint names consist of the table name plus _ibfk_ or _chk_ and a number. If the table name is close to the length limit for constraint names, the additional characters required for the constraint name may cause that name to exceed the limit, resulting in an error.
    44
    55My model is as follows
    6 
     6{{{ #!python
    77class BlackboardLearnerAssessmentDataTransmissionAudit(models.Model):
    88    enterprise_course_enrollment_id = models.PositiveIntegerField(
     
    1111        db_index=True
    1212    )
    13 
     13}}}
    1414In mysql8  it generate this query with a check `enterprise_cou_enrollment_id` integer UNSIGNED NOT NULL CHECK (`enterprise_cou_enrollment_id` >= 0) having this name `blackboard_blackboardlearnerassessmentdatatransmissionaudit_chk_1` ( 65 characters ) and it throws the error.
Back to Top