summaryrefslogtreecommitdiff
path: root/django/db/backends/oracle/schema.py
AgeCommit message (Collapse)Author
2025-12-13Fixed #36765 -- Added support for stored GeneratedFields on Oracle 23ai/26ai ↵Mariusz Felisiak
(23.7+). Thanks Jacob Walls for the review.
2025-10-18Fixed #21961 -- Added support for database-level delete options for ForeignKey.Mariusz Felisiak
Thanks Simon Charette for pair programming. Co-authored-by: Nick Stefan <NickStefan12@gmail.com> Co-authored-by: Akash Kumar Sen <71623442+Akash-Kumar-Sen@users.noreply.github.com> Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-03-09Fixed #35487 -- Removed CASCADE from RemoveField() on PostgreSQL.petr.prikryl
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-11-29Fixed #373 -- Added CompositePrimaryKey.Bendeguz Csirmaz
Thanks Lily Foote and Simon Charette for reviews and mentoring this Google Summer of Code 2024 project. Co-authored-by: Simon Charette <charette.s@gmail.com> Co-authored-by: Lily Foote <code@lilyf.org>
2024-04-02Fixed #35336 -- Addressed crash when adding a GeneratedField with % literals.Simon Charette
A longer term solution is likely to have a better separation of parametrized DDL altogether to handle checks, constraints, defaults, and generated fields but such a change would require a significant refactor that isn't suitable for a backport. Thanks Adrian Garcia for the report.
2023-05-12Fixed #470 -- Added support for database defaults on fields.Ian Foote
Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
2023-05-10Fixed #34553 -- Fixed improper % escaping of literal in constraints.Simon Charette
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.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
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
2022-12-22Fixed #34219 -- Preserved Char/TextField.db_collation when altering column type.Mariusz Felisiak
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).
2022-08-02Fixed #33881 -- Added support for database collations to ↵Mariusz Felisiak
ArrayField(Char/TextFields).
2022-04-29Refs #33671 -- Fixed migrations crash when adding collation to a primary key ↵Mariusz Felisiak
on Oracle.
2022-03-29Updated Oracle docs links to Oracle 21c.Mariusz Felisiak
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
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], )
2021-12-14Fixed #33358 -- Fixed handling timedelta < 1 day in schema operations on Oracle.mdalp
2021-09-28Fixed #33125 -- Avoided redundant unique constraint when converting a ↵Jordan Bae
non-unique field to primary key on MySQL and PostgreSQL.
2021-08-31Fixed #33057 -- Fixed recreation of foreign key constraints in m2m tables ↵Mariusz Felisiak
when altering type of referenced primary key on Oracle.
2021-02-09Fixed #32425 -- Fixed adding nullable field with default on MySQL.Jordan Bae
Thanks Simon Charette for the review.
2020-09-21Fixed #31777 -- Added support for database collations to Char/TextFields.Tom Carrick
Thanks Simon Charette and Mariusz Felisiak for reviews.
2020-08-24Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when ↵Tim Graham
migrating away from AutoField.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-08-02Fixed #30661 -- Added models.SmallAutoField.Nick Pope
2019-04-30Fixed #30408 -- Fixed crash when adding check constraints with LIKE operator ↵Simon Charette
on Oracle and PostgreSQL. The LIKE operator wildcard generated for contains, startswith, endswith and their case-insensitive variant lookups was conflicting with parameter interpolation on CREATE constraint statement execution. Ideally we'd delegate parameters interpolation in DDL statements on backends that support it but that would require backward incompatible changes to the Index and Constraint SQL generating methods. Thanks David Sanders for the report.
2019-02-07Updated Oracle docs links to Oracle 18c.Mariusz Felisiak
2019-01-29Fixed #30108 -- Allowed adding foreign key constraints in the same statement ↵Dan Tao
that adds a field.
2018-10-29Fixed #29547 -- Added support for partial indexes.Mads Jensen
Thanks to Ian Foote, Mariusz Felisiak, Simon Charettes, and Markus Holtermann for comments and feedback.
2018-06-17Fixed #29496 -- Fixed crash on Oracle when converting a non-unique field to ↵Mariusz Felisiak
primary key. Thanks Tim Graham for the review.
2017-11-23Used bytes.hex() and bytes.fromhex() to simplify.Sergey Fedoseev
2017-06-01Fixed #26682 -- Added support for Oracle identity columns.Mariusz Felisiak
Thanks Shai Berger and Tim Graham for reviews.
2017-05-23Fixed #27859 -- Ignored db_index for TextField/BinaryField on Oracle and MySQL.Mariusz Felisiak
Thanks Zubair Alam for the initial patch and Tim Graham for the review.
2017-04-27Fixed force_text() import in Oracle backend.Tim Graham
2017-04-21Updated Oracle docs links to Oracle 12c.Mariusz Felisiak
2017-02-28Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2016-10-12Fixed #27323 -- Optimized Oracle introspection by using USER_SEQUENCES ↵Mariusz Felisiak
instead of USER_CATALOG.
2015-06-24Refs #25002 -- Supported textual to temporal column alteration on Oracle.Simon Charette
Thanks to Tim Graham for the report and Shai Berger for the review.
2015-02-10Fixed #24200 -- Made introspection bypass statement cacheJosh Smeaton
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-14Fixed #22603 -- Reorganized classes in django.db.backends.Tim Graham
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-06-13Added django.utils.six.buffer_typesShai Berger
and used it in the Oracle SchemaEditor. Refs #22715.
2014-05-28Fixed #22715: Corrected sql for defaults of BinaryField on Oracle with Python3Shai Berger
While at it, fixed a problem in returning empty values (still with BinaryField/Oracle/Python3).
2014-05-20Fixed #22649: Beefed up quote_valueAndrew Godwin
2014-02-09Fixed #21844: Move quote_parameter off of Operations and renameAndrew Godwin
2013-09-06Fixed a number of flake8 errors -- particularly around unused imports and ↵Alex Gaynor
local variables
2013-09-06Adding 'sqlmigrate' command and quote_parameter to support it.Andrew Godwin
2013-08-23Fix Oracle's default handling and schema-prepared-statement issueAndrew Godwin