From 00ef74376e382cf33d6a9529bb9fc1b412e0bc7d Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 6 Dec 2023 13:51:54 +0100 Subject: [PATCH] Replaced deprecated database type synonyms in Oracle backend. --- django/db/backends/oracle/base.py | 4 ++-- django/db/backends/oracle/utils.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 803c3a5baf..70b280dd08 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -386,9 +386,9 @@ class OracleParam: self.input_size = param.input_size elif string_size > 4000: # 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): - self.input_size = Database.TIMESTAMP + self.input_size = Database.DB_TYPE_TIMESTAMP else: self.input_size = None diff --git a/django/db/backends/oracle/utils.py b/django/db/backends/oracle/utils.py index 930b8e0918..a5ec2f3899 100644 --- a/django/db/backends/oracle/utils.py +++ b/django/db/backends/oracle/utils.py @@ -21,8 +21,8 @@ class InsertVar: "PositiveBigIntegerField": int, "PositiveSmallIntegerField": int, "PositiveIntegerField": int, - "FloatField": Database.NATIVE_FLOAT, - "DateTimeField": Database.TIMESTAMP, + "FloatField": Database.DB_TYPE_BINARY_DOUBLE, + "DateTimeField": Database.DB_TYPE_TIMESTAMP, "DateField": Database.Date, "DecimalField": decimal.Decimal, } @@ -46,7 +46,7 @@ class Oracle_datetime(datetime.datetime): to tell oracledb to save the microseconds too. """ - input_size = Database.TIMESTAMP + input_size = Database.DB_TYPE_TIMESTAMP @classmethod def from_datetime(cls, dt):