summaryrefslogtreecommitdiff
path: root/django/db/backends/oracle/utils.py
diff options
context:
space:
mode:
authorHans Aarne Liblik <Hans.Liblik@gmail.com>2020-02-28 08:50:24 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-02-28 12:56:03 +0100
commita21f7b91db273a03abfb47b0580bb39e0043c99a (patch)
tree08b6590be6b539e8f9d42f943bdfd4e4adfa2c73 /django/db/backends/oracle/utils.py
parent8b30360322d4de6687e17ab267a856db4e3c78a6 (diff)
downloaddjango-a21f7b91db273a03abfb47b0580bb39e0043c99a.tar.gz
Fixed #31301 -- Fixed crash of QuerySet.bulk_create() with mixed empty and set ForeignKeys to AutoFields on Oracle.
Diffstat (limited to 'django/db/backends/oracle/utils.py')
-rw-r--r--django/db/backends/oracle/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/oracle/utils.py b/django/db/backends/oracle/utils.py
index a3d03fa1f9..62285f5ee4 100644
--- a/django/db/backends/oracle/utils.py
+++ b/django/db/backends/oracle/utils.py
@@ -62,6 +62,8 @@ class BulkInsertMapper:
TIMESTAMP = 'TO_TIMESTAMP(%s)'
types = {
+ 'AutoField': NUMBER,
+ 'BigAutoField': NUMBER,
'BigIntegerField': NUMBER,
'BinaryField': BLOB,
'BooleanField': NUMBER,
@@ -75,6 +77,7 @@ class BulkInsertMapper:
'PositiveBigIntegerField': NUMBER,
'PositiveIntegerField': NUMBER,
'PositiveSmallIntegerField': NUMBER,
+ 'SmallAutoField': NUMBER,
'SmallIntegerField': NUMBER,
'TextField': CLOB,
'TimeField': TIMESTAMP,