[Django] #30750: Add support for check constraints on MySQL 8.0.16+.

11 views
Skip to first unread message

Django

unread,
Sep 3, 2019, 2:59:03 AM9/3/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) | Keywords: MySQL, check
Severity: Normal | constraints
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
MySQL 8.0.16+ supports check constraints (see
[https://dev.mysql.com/doc/refman/8.0/en/create-table-check-
constraints.html documentation]), we should support them in Django.

--
Ticket URL: <https://code.djangoproject.com/ticket/30750>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 3, 2019, 3:31:03 AM9/3/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* Attachment "30750.diff" added.

patch

Django

unread,
Sep 3, 2019, 3:32:37 AM9/3/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by felixxm):

I've started to work on a patch but still a lot of `schema` tests are
failing on MySQL 8.

--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:1>

Django

unread,
Sep 3, 2019, 4:16:35 AM9/3/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Adam (Chainz) Johnson):

Thanks for making the ticket Mariusz. Yeah MySQL 8 is quite a change.

--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:2>

Django

unread,
Sep 3, 2019, 4:50:15 PM9/3/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Hasan Ramezani):

@felixxm can I continue your work on this ticket?

--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:3>

Django

unread,
Sep 4, 2019, 1:40:00 AM9/4/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by felixxm):

Hasan, sure feel free.

--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:4>

Django

unread,
Sep 4, 2019, 3:35:29 AM9/4/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* owner: nobody => Hasan Ramezani
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:5>

Django

unread,
Sep 4, 2019, 11:28:19 AM9/4/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* has_patch: 0 => 1


Comment:

@felixxm, I fixed the [https://github.com/django/django/pull/11743/files
#diff-888b45a0a8f38ee67e8d22403cf994dbL1133 test_alter_db_table_case
test].

The problem was that the table belongs to the `Author` model couldn't be
dropped because when the test rename table to the uppercase name, the
`_meta.db_table` has the old name(lowercase name).

So I added another rename to return the table to the original name.

--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:6>

Django

unread,
Sep 5, 2019, 3:51:21 AM9/5/19
to django-...@googlegroups.com
#30750: Add support for check constraints on MySQL 8.0.16+.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Hasan
| Ramezani
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: MySQL, check | Triage Stage: Accepted
constraints |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"e2c6a0858d7d9ad85eda353076a5b46608b704a9" e2c6a08]:
{{{
#!CommitTicketReference repository=""
revision="e2c6a0858d7d9ad85eda353076a5b46608b704a9"
Fixed #30750 -- Added support for check constraints on MySQL 8.0.16+.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30750#comment:7>

Reply all
Reply to author
Forward
0 new messages