summaryrefslogtreecommitdiff
path: root/django/db/backends/base/features.py
AgeCommit message (Collapse)Author
2026-04-18Fixed #37028 -- Added BitAnd(), BitOr(), and BitXor() aggregates.Mariusz Felisiak
2026-04-16Added DatabaseFeatures.disallowed_simple_test_case_connection_methods.Tim Graham
2026-03-19Refs #36795 -- Removed unnecessary prohibits_dollar_signs_in_column_aliases ↵Simon Charette
feature flag. Now that user provided aliases are systematically quoted there is no need to disallow the usage of the dollar sign on Postgres.
2026-03-08Added DatabaseFeatures.pattern_lookup_needs_param_pattern.Tim Graham
It's useful on MongoDB.
2026-02-09Added DatabaseFeatures.supports_inspectdb.Tim Graham
Needed by MongoDB.
2025-12-13Fixed #36765 -- Added support for stored GeneratedFields on Oracle 23ai/26ai ↵Mariusz Felisiak
(23.7+). Thanks Jacob Walls for the review.
2025-12-12Refs #36735 -- Supported shift parameter for UUID7 on PostgreSQL.Lily Acorn
2025-12-12Fixed #36735 -- Added UUID4 and UUID7 database functions.Lily Acorn
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-12-04Added DatabaseFeatures.prohibits_dollar_signs_in_column_aliases.Tim Graham
This is also applicable on CockroachDB.
2025-11-23Refs #21961 -- Added DatabaseFeatures.supports_on_delete_db_(cascade/null) ↵Tim Graham
feature flags. Needed on MongoDB. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-11-17Fixed #24920 -- Added support for DecimalField with no precision.Mariusz Felisiak
Thanks Lily 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-09-14Refs #27222 -- Refreshed GeneratedFields values on save() initiated update.Simon Charette
This required implementing UPDATE RETURNING machinery that heavily borrows from the INSERT one.
2025-08-07Fixed #36210, Refs #36181 -- Allowed Subquery usage in further lookups ↵Jacob Walls
against composite pks. Follow-up to 8561100425876bde3be4b2a22324655f74ff9609. 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-07-23Refs #36500 -- Shortened some long docstrings and comments.Mike Edmunds
Manually reformatted some long docstrings and comments that would be damaged by the to-be-applied autofixer script, in cases where editorial judgment seemed necessary for style or wording changes.
2025-05-20Fixed #34262 -- Added support for AnyValue for SQLite, MySQL, Oracle, and ↵ontowhee
Postgresql 16+. Thanks Simon Charette for the guidance and review. Thanks Tim Schilling for the documentation review. Thanks David Wobrock for investigation and solution proposals.
2025-05-14Fixed #36085 -- Added JSONField support for negative array indexing on SQLite.savanto
2025-04-30Refs #36052, #32234 -- Removed create_test_table_with_composite_primary_key ↵Simon Charette
flag in favor of using CompositePrimaryKey. Now that Django properly supports creating models with composite primary keys, the tests should use a `CompositePrimaryKey` field instead of a feature flag to inline backend specific SQL for creating a composite PK. Specifcially, the inspectdb's test_composite_primary_key was adjusted to use schema editor instead of per-backend raw SQL.
2025-03-17Fixed #34865 -- Released memory earlier than garbage collection on database ↵fowczrek
wrapping layers. Thank you Florian Apolloner, Jake Howard and Patryk Zawadzki for the clarifying comments and reviews.
2025-03-03Fixed #35444 -- Added generic support for Aggregate.order_by.Chris Muthig
This moves the behaviors of `order_by` used in Postgres aggregates into the `Aggregate` class. This allows for creating aggregate functions that support this behavior across all database engines. This is shown by moving the `StringAgg` class into the shared `aggregates` module and adding support for all databases. The Postgres `StringAgg` class is now a thin wrapper on the new shared `StringAgg` class. Thank you Simon Charette for the review.
2025-02-09Refs #36148 -- Relied on a feature switch to define tuple lookups support.Simon Charette
This should allow backends more easily opt-in or out of native support and rely on the fallback if unavailable.
2024-12-18Added DatabaseFeatures.rounds_to_even.Tim Graham
This feature flag useful with MongoDB: "Rounding to the nearest even value supports more even distribution of rounded data than always rounding up or down."
2023-11-02Refs #31300 -- Allowed testing GeneratedField without collation.Tim Graham
CockroachDB and Snowflake don't support it.
2023-10-30Refs #29850 -- Added exclusion support to window frames.Sarah Boyce
2023-09-07Fixed #31300 -- Added GeneratedField model field.Jeremy Nauta
Thanks Adam Johnson and Paolo Melchiorre for reviews. Co-Authored-By: Lily Foote <code@lilyf.org> Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-08-04Fixed #34760 -- Dropped support for SQLite < 3.27.Mariusz Felisiak
2023-07-19Fixed #34701 -- Added support for NULLS [NOT] DISTINCT on PostgreSQL 15+.Simon Charette
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-01Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin
self-referential subqueries if supported.
2023-01-09Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette
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.
2022-12-28Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.Adrian Torres
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-28Fixed #18468 -- Added support for comments on columns and tables.kimsoungryoul
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>
2022-12-15Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-11-07Refs #17144 -- Removed support for grouping by primary key.Simon Charette
No core backend require the feature anymore as it was only added to support a MySQL'ism that has been deprecated since then.
2022-10-06Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.Simon Charette
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.
2022-10-05Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on ↵Simon Charette
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.
2022-09-13Fixed #33996 -- Fixed CheckConstraint validation on NULL values.David Sanders
Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report.
2022-06-01Fixed #32234 -- Made inspectdb inform about composite primary keys.Anv3sh
2022-05-12Refs #27064 -- Added RenameIndex migration operation.David Wobrock
2022-04-11Removed DatabaseFeatures.validates_explain_options.Mariusz Felisiak
Always True since 6723a26e59b0b5429a0c5873941e01a2e1bdbb81.
2022-03-04Fixed #29865 -- Added logical XOR support for Q() and querysets.Ryan Heard
2022-02-18Fixed #33379 -- Added minimum database version checks.Hasan Ramezani
Thanks Tim Graham for the review.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-19Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().sean_c_hsu
Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope, and Mariusz Felisiak for reviews.
2021-11-02Fixed #33224 -- Removed ↵Hasan Ramezani
DatabaseFeatures.supports_mixed_date_datetime_comparisons.
2021-10-28Fixed #33228 -- Changed value of ↵Chinmoy
BaseDatabaseFeatures.has_case_insensitive_like to False.
2021-08-24Refs #10929 -- Allowed NowUTC SQL customization for third-party backends.Tim Graham
2021-06-30Fixed #32786 -- Moved subquery ordering clearing optimization to the _in lookup.Hannes Ljungberg
Co-Authored-By: Simon Charette <charette.s@gmail.com>
2021-01-14Refs #26167 -- Changed default value of ↵Hannes Ljungberg
DatabaseFeatures.supports_expression_indexes to True.