Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2022-03-05 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Thanks for extra details and a sample project.

 I was able to reproduce this error, however Django is not at fault, it
 seems to be an issue in MySQL itself. Django executes:
 {{{#!sql
 CREATE TABLE
 `ticket_33169_whiteboxstudentsexaminationdatatransferauditionf7bf` (
 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
 `unique_student_enrollment_id` integer UNSIGNED NOT NULL CHECK
 (`unique_student_enrollment_id` >= 0)
 )
 }}}
 (I called my app `ticket_33169`) so
 `ticket_33169_whiteboxstudentsexaminationdatatransferauditionf7bf_chk_1`
 is a internal name generated by MySQL. Surprisingly, MySQL doesn't respect
 its own limitations.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017f59d4ff62-592cdfb3-56d2-4ea3-b4a2-04212a51120f-00%40eu-central-1.amazonses.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2022-03-05 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Awais Qureshi):

 * status:  closed => new
 * resolution:  needsinfo =>


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017f59d4e017-6b8a69cc-82a7-485b-989a-90812473-00%40eu-central-1.amazonses.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2022-03-05 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Awais Qureshi):

 I have created a simple app to reproduce this issue. You can see three
 `github` checks are running and `django30` and `django32` are showing
 error. Since this feature was introduced in `django30`.

 This change is related with Added support for check constraints on MySQL
 8.0.16+.  [https://github.com/django/django/pull/11743]

 Sample project with long table name where `mysql8` and `django` is
 generating internal checks if model has PositiveIntegerField.

 Possible solution:
 In case of `makemigrations` trigger some error with max length or truncate
 the check name.
 In case of upgrading existing project from `mysql57` to `mysql80` show
 some valid error message during `migrate` command.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017f59d0d0a8-8f853f54-a674-4800-9c68-70f3fe0e915d-00%40eu-central-1.amazonses.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2022-01-24 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Awais Qureshi):

 It's not a django issue. as per mysql8.0
 [https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html]

 `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.`

 My model is as follows

 class BlackboardLearnerAssessmentDataTransmissionAudit(models.Model):
 enterprise_course_enrollment_id = models.PositiveIntegerField(
 blank=False,
 null=False,
 db_index=True
 )

 In 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.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.03891fc5b67432d6ea9b68914742a5fa%40djangoproject.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2022-01-13 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Awais, I cannot reproduce this issue in MySQL 8 or 5.7 you also didn't
 provide a minimum project to reproduce. I don't think you've explained the
 issue in enough detail to confirm a bug in Django. Please reopen the
 ticket if you can debug your issue and provide details about why and where
 Django is at fault.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.0319dc81292150c54bf02d92559ccca7%40djangoproject.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2022-01-13 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Awais Qureshi):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 I have added all required information. You can consider re-opening this
 issue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.7c095444b70736e5890facf405016bbc%40djangoproject.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 )

2021-10-05 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Awais Qureshi:

Old description:

> 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")
>
> This issue appeared in `django30` also.
>
> 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.
>

> `OS details`
> mysql  Ver 8.0.26-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
> Python 3.8
> Django 30,31,38

New description:

 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")

 This issue appeared in `django30` also.

 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.


 `OS details`
 mysql  Ver 8.0.26-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
 Python 3.8
 Django 30,31,32

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.331781b1f902281c4c76525a12bb8f3d%40djangoproject.com.


Re: [Django] #33169: Migrations crashes with long identifiers on MySQL (8.0.26 ) (was: Migrations crashes with long identifiers on MySQL.)

2021-10-05 Thread Django
#33169: Migrations crashes with long identifiers on MySQL (8.0.26 )
-+-
 Reporter:  Awais Qureshi|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
  django32,mysql8.0.26   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Awais Qureshi):

 * keywords:  django32 => django32,mysql8.0.26


Old description:

> 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.

New description:

 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")

 This issue appeared in `django30` also.

 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.


 `OS details`
 mysql  Ver 8.0.26-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
 Python 3.8
 Django 30,31,38

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e060878df044ce095febacfe561dc58e%40djangoproject.com.