Opened 5 years ago

Closed 5 years ago

#30750 closed New feature (fixed)

Add support for check constraints on MySQL 8.0.16+.

Reported by: Mariusz Felisiak Owned by: Hasan Ramezani
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: MySQL, check constraints
Cc: Adam Johnson Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

MySQL 8.0.16+ supports check constraints (see documentation), we should support them in Django.

Attachments (1)

30750.diff (4.8 KB ) - added by Mariusz Felisiak 5 years ago.
patch

Download all attachments as: .zip

Change History (8)

by Mariusz Felisiak, 5 years ago

Attachment: 30750.diff added

patch

comment:1 by Mariusz Felisiak, 5 years ago

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

comment:2 by Adam Johnson, 5 years ago

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

comment:3 by Hasan Ramezani, 5 years ago

@felixxm can I continue your work on this ticket?

comment:4 by Mariusz Felisiak, 5 years ago

Hasan, sure feel free.

comment:5 by Hasan Ramezani, 5 years ago

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:6 by Hasan Ramezani, 5 years ago

Has patch: set

@felixxm, I fixed the 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.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In e2c6a08:

Fixed #30750 -- Added support for check constraints on MySQL 8.0.16+.

Note: See TracTickets for help on using tickets.
Back to Top