Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2023-02-23 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+-
 Reporter:  Max Fisco   |Owner:  Bhuvnesh
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:  fixed
 Keywords:  | Triage Stage:  Ready for checkin
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+-

Comment (by GitHub ):

 In [changeset:"16c966ff7fc9ce01e3afd87ef2af55859cadb587" 16c966ff]:
 {{{
 #!CommitTicketReference repository=""
 revision="16c966ff7fc9ce01e3afd87ef2af55859cadb587"
 Refs #30060, Refs #34217 -- Made SchemaEditor not generate SQL for
 CheckConstraint if not supported.

 The new logic mirrors the logic in SchemaEditor._delete_check_sql()
 added in 68ef274bc505cd44f305c03cbf84cf08826200a8.

 Thanks Tim Graham for the report.
 }}}

-- 
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/010701867fe842b3-bb4f4911-d5c9-4798-9059-265e3235935f-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-26 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+-
 Reporter:  Max Fisco   |Owner:  Bhuvnesh
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:  fixed
 Keywords:  | Triage Stage:  Ready for checkin
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"68ef274bc505cd44f305c03cbf84cf08826200a8" 68ef274b]:
 {{{
 #!CommitTicketReference repository=""
 revision="68ef274bc505cd44f305c03cbf84cf08826200a8"
 Fixed #34217 -- Fixed migration crash when removing check constraints on
 MySQL < 8.0.16.
 }}}

-- 
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/010701855266942e-b80dfabc-8a72-4041-ab2f-e4b32c6fa0c2-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-26 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+-
 Reporter:  Max Fisco   |Owner:  Bhuvnesh
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Ready for checkin
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


-- 
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/010701855236e583-b77cddfe-53a5-4d4d-ac56-e3ea2d53cabc-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-25 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max Fisco   |Owner:  Bhuvnesh
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Jacob Walls):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/16405 PR]

-- 
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/010701854af232b3-8977376e-c748-4fe7-82c7-41faaf53f11f-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-25 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max Fisco   |Owner:  Bhuvnesh
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by David Wobrock):

 * cc: David Wobrock (added)


-- 
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/0107018549b01265-f14df84f-71f6-4e80-bece-2dbebea9ec0a-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-22 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max Fisco   |Owner:  Bhuvnesh
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Bhuvnesh):

 * owner:  nobody => Bhuvnesh
 * status:  new => assigned


Comment:

 Okay ,Thanks !

-- 
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/010701853b439a84-b886d7c1-07b8-4058-bb06-8190c7a12b1b-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-22 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max Fisco   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Max Fisco):

 Replying to [comment:4 Bhuvnesh]:
 > Hi Max, if you are working on this issue please assign it to yourself,
 if not, i would like to submit a patch. 🙂
 Hi Bhuvnesh, I apologize for leaving it ambiguous, go ahead and submit the
 patch.

-- 
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/010701853b112abf-8f91088e-1034-4384-9e64-e2b9b8dc9341-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-22 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max Fisco   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Bhuvnesh):

 Hi Max, if you are working on this issue please assign it to yourself, if
 not, i would like to submit a patch. 🙂

-- 
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/010701853b085cd9-d2d5d735-4335-4b74-b298-becd94ecb856-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-19 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max Fisco   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Mariusz Felisiak):

 Replying to [comment:2 Max Fisco]:
 > Hi Mariusz,
 >
 > Thanks for the quick response! As far as the patch goes, I'd love to
 contribute (first time reporting a bug) but I think it'd be better to let
 someone else pick it up.
 >
 > I tried to by following along with
 [https://docs.djangoproject.com/en/dev/intro/contributing/#writing-your-
 first-patch-for-django]; however, I'm having some difficulty figuring out
 how to just get the tests to run using MySQL 5.7 in the first place 😕.
 >
 > {{{
 >
 >   File "/Users/maxwellfisco/django-
 fork/django/django/db/backends/base/base.py", line 214, in
 check_database_version_supported
 > raise NotSupportedError(
 > django.db.utils.NotSupportedError: MySQL 8 or later is required (found
 5.7.40).
 > }}}

 Django 4.2 no longer supports MySQL < 8, so you need to use MySQL 8 to
 test against the current `main` branch.

-- 
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/010701852dbb606a-6889b043-8f7f-43b1-b58e-8d4a18ce672a-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16.

2022-12-19 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max F.  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Max F.):

 Hi Mariusz,

 Thanks for the quick response! As far as the patch goes, I'd love to
 contribute (first time reporting a bug) but I think it'd be better to let
 someone else pick it up.

 I tried to by following along with
 [https://docs.djangoproject.com/en/dev/intro/contributing/#writing-your-
 first-patch-for-django]; however, I'm having some difficulty figuring out
 how to just get the tests to run using MySQL 5.7 in the first place 😕.

 {{{

   File "/Users/maxwellfisco/django-
 fork/django/django/db/backends/base/base.py", line 214, in
 check_database_version_supported
 raise NotSupportedError(
 django.db.utils.NotSupportedError: MySQL 8 or later is required (found
 5.7.40).
 }}}

-- 
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/010701852c38939f-e5c9508f-8662-4143-9657-b9b2fb69a9de-00%40eu-central-1.amazonses.com.


Re: [Django] #34217: Migration removing a CheckConstraint results in ProgrammingError using MySQL < 8.0.16. (was: Migration removing a CheckConstraint results in ProgrammingError using MySQL (5.7.31))

2022-12-18 Thread Django
#34217: Migration removing a CheckConstraint results in ProgrammingError using
MySQL < 8.0.16.
+
 Reporter:  Max F.  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  4.1
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report. Agreed, removing a check constraint should be no-op
 when not supported, the following diff fix it for me:
 {{{#!diff
 diff --git a/django/db/backends/base/schema.py
 b/django/db/backends/base/schema.py
 index fe31967ce2..8e6c21647e 100644
 --- a/django/db/backends/base/schema.py
 +++ b/django/db/backends/base/schema.py
 @@ -1667,6 +1667,8 @@ class BaseDatabaseSchemaEditor:
  )

  def _delete_check_sql(self, model, name):
 +if not self.connection.features.supports_table_check_constraints:
 +return None
  return self._delete_constraint_sql(self.sql_delete_check, model,
 name)

  def _delete_constraint_sql(self, template, model, name):

 }}}
 Would you like to prepare a patch? (a regression test in
 `migrations.test_operations.OperationTests` is required.)

-- 
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/0107018528c866b0-f47df7e8-3e48-4d5d-8015-5b6ac9c74f60-00%40eu-central-1.amazonses.com.