summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2012-04-29 19:25:46 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2012-04-29 19:25:46 +0300
commit584e2c03376895aeb0404cc1fcc1ad24dfdbc58e (patch)
treed191c71b3a8a6f9788658562be0f42e44816952c /docs/ref/models
parente75bd7e51cd6fe1f02fcdb438d58770917116c8f (diff)
Prevent Oracle from changing field.null to True
Fixed #17957 -- when using Oracle and character fields, the fields were set null = True to ease the handling of empty strings. This caused problems when using multiple databases from different vendors, or when the character field happened to be also a primary key. The handling was changed so that NOT NULL is not emitted on Oracle even if field.null = False, and field.null is not touched otherwise. Thanks to bhuztez for the report, ramiro for triaging & comments, ikelly for the patch and alex for reviewing.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/fields.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index d1f12ffc95..eab7ad91e1 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -55,9 +55,8 @@ string, not ``NULL``.
.. note::
- When using the Oracle database backend, the ``null=True`` option will be
- coerced for string-based fields that have the empty string as a possible
- value, and the value ``NULL`` will be stored to denote the empty string.
+ When using the Oracle database backend, the value ``NULL`` will be stored to
+ denote the empty string regardless of this attribute.
If you want to accept :attr:`~Field.null` values with :class:`BooleanField`,
use :class:`NullBooleanField` instead.