summaryrefslogtreecommitdiff
path: root/django/db/backends/oracle
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #470 -- Added support for database defaults on fields.Ian Foote2023-05-123-2/+8
| | | | | | | | Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
* Fixed #34553 -- Fixed improper % escaping of literal in constraints.Simon Charette2023-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Proper escaping of % in string literals used when defining constaints was attempted (a8b3f96f6) by overriding quote_value of Postgres and Oracle schema editor. The same approach was used when adding support for constraints to the MySQL/MariaDB backend (1fc2c70). Later on it was discovered that this approach was not appropriate and that a preferable one was to pass params=None when executing the constraint creation DDL to avoid any form of interpolation in the first place (42e8cf47). When the second patch was applied the corrective of the first were not removed which caused % literals to be unnecessary doubled. This flew under the radar because the existings test were crafted in a way that consecutive %% didn't catch regressions. This commit introduces an extra test for __exact lookups which highlights more adequately % doubling problems but also adjust a previous __endswith test to cover % doubling problems (%\% -> %%\%%). Thanks Thomas Kolar for the report. Refs #32369, #30408, #30593.
* Fixed #34544 -- Avoided DBMS_LOB.SUBSTR() wrapping with IS NULL condition on ↵Mariusz Felisiak2023-05-081-7/+3
| | | | | | | | | Oracle. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca. Thanks Michael Smith for the report. This also reverts commit 1e4da439556cdd69eb9f91e07f99cf77997e70d2.
* Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock2023-04-181-0/+3
| | | | relation on PostgreSQL.
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-1/+0
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette2023-01-091-1/+1
| | | | | | | | | | | | | | | Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases.
* Fixed #18468 -- Added support for comments on columns and tables.kimsoungryoul2022-12-282-8/+33
| | | | | | | | Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz Felisiak for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
* Fixed #34219 -- Preserved Char/TextField.db_collation when altering column type.Mariusz Felisiak2022-12-221-12/+11
| | | | | | | This moves setting a database collation to the column type alteration as both must be set at the same time. This should also avoid another layer of the column type alteration when adding database comments support (#18468).
* Made inspectdb used Cursor.description.display_size for CharFields' max_length.Mariusz Felisiak2022-12-081-6/+7
| | | internal_size is size for fixed-size types not for char types.
* Fixed #34103 -- Fixed logging SQL queries with duplicate parameters on Oracle.David Sanders2022-11-251-8/+8
|
* Fixed #31090 -- Logged transaction management queries.Ilya Bass2022-11-211-1/+2
| | | | | Thanks to Petter Strandmark for the original idea and Mariusz Felisiak for advice during the DjangoConUS 2022 Sprint!
* Used more augmented assignment statements.Nick Pope2022-10-312-4/+4
| | | | | | Identified using the following command: $ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
* Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.Simon Charette2022-10-061-0/+1
| | | | | | | This ensures explicit grouping from using values() before annotating an aggregate function groups by selected aliases if supported. The GROUP BY feature is disabled on Oracle because it doesn't support it.
* Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on ↵Simon Charette2022-10-051-0/+1
| | | | | | | | | | | MySQL. Columns of the left outer most select statement in a combined query can be referenced by alias just like by index. This removes combined query ordering by column index and avoids an unnecessary usage of RawSQL which causes issues for backends that specialize the treatment of null ordering.
* Fixed #33996 -- Fixed CheckConstraint validation on NULL values.David Sanders2022-09-131-0/+1
| | | | | | Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report.
* Fixed #33881 -- Added support for database collations to ↵Mariusz Felisiak2022-08-021-2/+4
| | | | ArrayField(Char/TextFields).
* Refs CVE-2022-34265 -- Unified DatabaseOperations._convert_*_to_tz() hook names.Mariusz Felisiak2022-07-091-7/+7
|
* Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.Simon Charette2022-07-061-54/+69
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #33815 -- Fixed last_executed_query() on Oracle when parameter names ↵Mariusz Felisiak2022-07-051-4/+5
| | | | overlap.
* Refs #32786 -- Made query clear ordering when ordered combined queryset is ↵Mariusz Felisiak2022-06-271-5/+0
| | | | used in subquery on Oracle.
* Fixed #33796 -- Fixed ordered combined queryset crash when used in subquery ↵Mariusz Felisiak2022-06-271-0/+5
| | | | | | | | on PostgreSQL and MySQL. Thanks Shai Berger for the report. Regression in 30a01441347d5a2146af2944b29778fa0834d4be.
* Fixed #32234 -- Made inspectdb inform about composite primary keys.Anv3sh2022-06-012-5/+12
|
* Refs #27064 -- Added RenameIndex migration operation.David Wobrock2022-05-121-0/+1
|
* Fixed #33413 -- Made migrations propage collations to related fields.David Wobrock2022-05-021-0/+4
|
* Refs #33671 -- Fixed migrations crash when adding collation to a primary key ↵Mariusz Felisiak2022-04-291-0/+8
| | | | on Oracle.
* Updated Oracle docs links to Oracle 21c.Mariusz Felisiak2022-03-292-4/+4
|
* Refs #33517 -- Prevented __second lookup from returning fractional seconds ↵nabil-rady2022-02-221-0/+6
| | | | on PostgreSQL.
* Fixed #33379 -- Added minimum database version checks.Hasan Ramezani2022-02-182-0/+5
| | | | Thanks Tim Graham for the review.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-076-32/+71
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-0710-586/+786
|
* Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak2022-02-033-20/+50
| | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
* Fixed broken link to cx_Oracle docs.Ian Foote2022-01-251-1/+1
|
* Refs #33355 -- Added missing tests for database functions and expression on ↵Adam Johnson2021-12-221-0/+1
| | | | null values.
* Fixed #33358 -- Fixed handling timedelta < 1 day in schema operations on Oracle.mdalp2021-12-141-0/+3
|
* Refs #33355 -- Fixed Trunc() with years < 1000 on SQLite.Adam Johnson2021-12-131-0/+5
| | | | | | Thanks to Nick Pope for spotting the bug in Code Review. Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
* Fixed #33340 -- Fixed unquoted column names in queries used by DatabaseCache.Arsa2021-12-091-1/+6
|
* Fixed #33339 -- Made QuerySet.bulk_create() use TO_NCLOB() for TextFields on ↵Georgi Yanchev2021-12-031-2/+2
| | | | Oracle.
* Removed unneeded supports_combined_alters feature flag on Oracle.Mariusz Felisiak2021-11-241-1/+0
| | | supports_combined_alters is False by default.
* Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol2021-11-121-6/+5
| | | | | | Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1.
* Removed DatabaseIntrospection.get_key_columns().Mariusz Felisiak2021-11-101-14/+0
| | | Thanks Simon Charette for the report.
* Fixed DatabaseIntrospection.get_relations() docstring.Tim Graham2021-11-101-1/+1
| | | The foreign keys are "in" the given table, not "to" it.
* Fixed #33228 -- Changed value of ↵Chinmoy2021-10-281-1/+0
| | | | BaseDatabaseFeatures.has_case_insensitive_like to False.
* Fixed #33125 -- Avoided redundant unique constraint when converting a ↵Jordan Bae2021-09-281-6/+0
| | | | non-unique field to primary key on MySQL and PostgreSQL.
* Fixed #33057 -- Fixed recreation of foreign key constraints in m2m tables ↵Mariusz Felisiak2021-08-311-1/+14
| | | | when altering type of referenced primary key on Oracle.
* Refs #10929 -- Allowed NowUTC SQL customization for third-party backends.Tim Graham2021-08-241-0/+1
|
* Fixed #27021 -- Allowed lookup expressions in annotations, aggregations, and ↵Ian Foote2021-07-091-3/+3
| | | | | | | | QuerySet.filter(). Thanks Hannes Ljungberg and Simon Charette for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #32786 -- Moved subquery ordering clearing optimization to the _in lookup.Hannes Ljungberg2021-06-301-0/+1
| | | | Co-Authored-By: Simon Charette <charette.s@gmail.com>
* Fixed #32722 -- Fixed comparing to TruncTime() on Oracle.Mariusz Felisiak2021-05-112-7/+9
|
* Fixed #32699 -- Fixed comparing to TruncTime() with 0 microseconds on MySQL.Alex Hill2021-05-071-0/+4
|
* Fixed #32653 -- Made quoting names in the Oracle backend consistent with ↵Mariusz Felisiak2021-04-301-1/+1
| | | | db_table.