diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-04-29 19:25:46 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-04-29 19:25:46 +0300 |
| commit | 584e2c03376895aeb0404cc1fcc1ad24dfdbc58e (patch) | |
| tree | d191c71b3a8a6f9788658562be0f42e44816952c /docs/ref/databases.txt | |
| parent | e75bd7e51cd6fe1f02fcdb438d58770917116c8f (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/databases.txt')
| -rw-r--r-- | docs/ref/databases.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 8fbe4125c9..2dea337d2b 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -685,11 +685,11 @@ NULL and empty strings Django generally prefers to use the empty string ('') rather than NULL, but Oracle treats both identically. To get around this, the -Oracle backend coerces the ``null=True`` option on fields that have -the empty string as a possible value. When fetching from the database, -it is assumed that a NULL value in one of these fields really means -the empty string, and the data is silently converted to reflect this -assumption. +Oracle backend ignores an explicit ``null`` option on fields that +have the empty string as a possible value and generates DDL as if +``null=True``. When fetching from the database, it is assumed that +a ``NULL`` value in one of these fields really means the empty +string, and the data is silently converted to reflect this assumption. ``TextField`` limitations ------------------------- |
