mirror of https://github.com/django/django.git
Replaced deprecated database type synonyms in Oracle backend.
This commit is contained in:
parent
66d58e77de
commit
00ef74376e
|
@ -386,9 +386,9 @@ class OracleParam:
|
||||||
self.input_size = param.input_size
|
self.input_size = param.input_size
|
||||||
elif string_size > 4000:
|
elif string_size > 4000:
|
||||||
# Mark any string param greater than 4000 characters as a CLOB.
|
# Mark any string param greater than 4000 characters as a CLOB.
|
||||||
self.input_size = Database.CLOB
|
self.input_size = Database.DB_TYPE_CLOB
|
||||||
elif isinstance(param, datetime.datetime):
|
elif isinstance(param, datetime.datetime):
|
||||||
self.input_size = Database.TIMESTAMP
|
self.input_size = Database.DB_TYPE_TIMESTAMP
|
||||||
else:
|
else:
|
||||||
self.input_size = None
|
self.input_size = None
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ class InsertVar:
|
||||||
"PositiveBigIntegerField": int,
|
"PositiveBigIntegerField": int,
|
||||||
"PositiveSmallIntegerField": int,
|
"PositiveSmallIntegerField": int,
|
||||||
"PositiveIntegerField": int,
|
"PositiveIntegerField": int,
|
||||||
"FloatField": Database.NATIVE_FLOAT,
|
"FloatField": Database.DB_TYPE_BINARY_DOUBLE,
|
||||||
"DateTimeField": Database.TIMESTAMP,
|
"DateTimeField": Database.DB_TYPE_TIMESTAMP,
|
||||||
"DateField": Database.Date,
|
"DateField": Database.Date,
|
||||||
"DecimalField": decimal.Decimal,
|
"DecimalField": decimal.Decimal,
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class Oracle_datetime(datetime.datetime):
|
||||||
to tell oracledb to save the microseconds too.
|
to tell oracledb to save the microseconds too.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
input_size = Database.TIMESTAMP
|
input_size = Database.DB_TYPE_TIMESTAMP
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_datetime(cls, dt):
|
def from_datetime(cls, dt):
|
||||||
|
|
Loading…
Reference in New Issue