[Django] #31492: Changing field type can cause unrelated nullability change in field on Oracle.

35 views
Skip to first unread message

Django

unread,
Apr 21, 2020, 2:27:20 AM4/21/20
to django-...@googlegroups.com
#31492: Changing field type can cause unrelated nullability change in field on
Oracle.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 3.0
layer (models, ORM) |
Severity: Normal | Keywords: oracle null
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changing a field type with implicit check constraint (e.g.
`PositiveIntegerField`) to a field without it (e.g. `CharField`) causes
nullability change because Django drops all check constraints in such
case, i.e. `NOT NULL` and `"COLUMN" >= 0` constraints (see
[https://github.com/django/django/blob/505fec6badba0622bbf97bb659188c3d62a9bc58/django/db/backends/base/schema.py#L645-L650
_alter_field()]).

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

Django

unread,
Apr 21, 2020, 2:28:09 AM4/21/20
to django-...@googlegroups.com
#31492: Changing field type can cause unrelated nullability change in field on
Oracle.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:

Keywords: oracle null | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

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

* Attachment "test.py" added.

Django

unread,
Apr 21, 2020, 4:58:05 AM4/21/20
to django-...@googlegroups.com
#31492: Changing field type can cause unrelated nullability change in field on
Oracle.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle null | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

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

* stage: Unreviewed => Accepted


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

Django

unread,
Apr 21, 2020, 8:00:21 AM4/21/20
to django-...@googlegroups.com
#31492: Changing field type can cause unrelated nullability change in field on
Oracle.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle null | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

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

* cc: Ian Bottomley (added)


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

Django

unread,
Mar 15, 2026, 11:01:59 AMMar 15
to django-...@googlegroups.com
#31492: Changing field type can cause unrelated nullability change in field on
Oracle.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Itxaso
| Aizpurua
Type: Bug | Status: assigned
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle null | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Itxaso Aizpurua):

* owner: nobody => Itxaso Aizpurua
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/31492#comment:3>
Reply all
Reply to author
Forward
0 new messages