[Django] #30614: Add constraint name validation to system checks.

5 views
Skip to first unread message

Django

unread,
Jul 5, 2019, 4:42:23 AM7/5/19
to django-...@googlegroups.com
#30614: Add constraint name validation to system checks.
-------------------------------------+-------------------------------------
Reporter: Can | Owner: nobody
Sarıgöl |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------


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

Django

unread,
Jul 5, 2019, 4:50:12 AM7/5/19
to django-...@googlegroups.com
#30614: Add constraint name validation to system checks.
-------------------------------------+-------------------------------------
Reporter: Can Sarıgöl | Owner: Can
Type: | Sarıgöl
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Can Sarıgöl):

* owner: nobody => Can Sarıgöl
* status: new => assigned
* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Jul 5, 2019, 6:19:00 AM7/5/19
to django-...@googlegroups.com
#30614: Add constraint name validation to system checks.
-------------------------------------+-------------------------------------
Reporter: Can Sarıgöl | Owner: Can
Type: | Sarıgöl
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Old description:

New description:

Constraints names cannot start with an underscore or a number and cannot
be longer than 30 characters on Oracle. We can restrict them with system
checks for cross-database compatibility.

--

Comment (by felixxm):

After double-thinking I'm not sure if we want this change. First of all it
is backward incompatible and it is not a minor incompatibility.
Constraints have been introduced in Django 2.2 and for all databases
(except Oracle) names starting with an underscore `_` or a digit, or with
a name of length greater than 30 characters are valid (63 characters on
PostgreSQL, 64 on MySQL). I agree that it is a inconsistency between
constraints and indexes policy but still we need to be careful with
introducing incompatibilities.

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

Django

unread,
Jul 8, 2019, 4:41:46 AM7/8/19
to django-...@googlegroups.com
#30614: Add constraint name validation to system checks.
-------------------------------------+-------------------------------------
Reporter: Can Sarıgöl | Owner: Can
Type: | Sarıgöl
Cleanup/optimization | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

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


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

Reply all
Reply to author
Forward
0 new messages