Skip to content

Commit

Permalink
Replaced deprecated database type synonyms in Oracle backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm authored Dec 6, 2023
1 parent 66d58e7 commit 00ef743
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions django/db/backends/oracle/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ def __init__(self, param, cursor, strings_only=False):
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

Expand Down
6 changes: 3 additions & 3 deletions django/db/backends/oracle/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand All @@ -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):
Expand Down

0 comments on commit 00ef743

Please sign in to comment.