summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-02-07 09:59:47 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-02-07 10:03:11 +0100
commit0aff35459db46a1d4d4383f379416565ff2fce9e (patch)
tree58e6577285bd2867ecbc845712441b5b484b3e5a /django
parentd293948938d1b07bcacac220adb42266fa67f83e (diff)
[2.2.x] Updated Oracle docs links to Oracle 18c.
Backport of 759a9b710c0e5a6009cfba406ff562919fa70ef0 from master
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/oracle/operations.py6
-rw-r--r--django/db/backends/oracle/schema.py3
2 files changed, 5 insertions, 4 deletions
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py
index 11a271385f..dae435c383 100644
--- a/django/db/backends/oracle/operations.py
+++ b/django/db/backends/oracle/operations.py
@@ -74,11 +74,11 @@ END;
elif lookup_type == 'iso_year':
return "TO_CHAR(%s, 'IYYY')" % field_name
else:
- # https://docs.oracle.com/database/121/SQLRF/functions067.htm#SQLRF00639
+ # https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/EXTRACT-datetime.html
return "EXTRACT(%s FROM %s)" % (lookup_type.upper(), field_name)
def date_trunc_sql(self, lookup_type, field_name):
- # https://docs.oracle.com/database/121/SQLRF/functions271.htm#SQLRF52058
+ # https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/ROUND-and-TRUNC-Date-Functions.html
if lookup_type in ('year', 'month'):
return "TRUNC(%s, '%s')" % (field_name, lookup_type.upper())
elif lookup_type == 'quarter':
@@ -118,7 +118,7 @@ END;
def datetime_trunc_sql(self, lookup_type, field_name, tzname):
field_name = self._convert_field_to_tz(field_name, tzname)
- # https://docs.oracle.com/database/121/SQLRF/functions271.htm#SQLRF52058
+ # https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/ROUND-and-TRUNC-Date-Functions.html
if lookup_type in ('year', 'month'):
sql = "TRUNC(%s, '%s')" % (field_name, lookup_type.upper())
elif lookup_type == 'quarter':
diff --git a/django/db/backends/oracle/schema.py b/django/db/backends/oracle/schema.py
index 4355402c52..0664a4ded5 100644
--- a/django/db/backends/oracle/schema.py
+++ b/django/db/backends/oracle/schema.py
@@ -94,7 +94,8 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# Add it
self.add_field(model, new_temp_field)
# Explicit data type conversion
- # https://docs.oracle.com/database/121/SQLRF/sql_elements002.htm#SQLRF51054
+ # https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf
+ # /Data-Type-Comparison-Rules.html#GUID-D0C5A47E-6F93-4C2D-9E49-4F2B86B359DD
new_value = self.quote_name(old_field.column)
old_type = old_field.db_type(self.connection)
if re.match('^N?CLOB', old_type):