summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/features.py
AgeCommit message (Collapse)Author
2026-04-18Fixed #37028 -- Added BitAnd(), BitOr(), and BitXor() aggregates.Mariusz Felisiak
2026-01-25Fixed #36812 -- Dropped support for MariaDB < 10.11.Skyiesac
2025-12-12Fixed #36735 -- Added UUID4 and UUID7 database functions.Lily Acorn
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-10-27Fixed #36624 -- Dropped support for MySQL < 8.4.Mariusz Felisiak
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-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-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-09Fixed #36105 -- Dropped support for MariaDB 10.5.Mariusz Felisiak
2024-11-18Fixed #18392 -- Changed default mysql encoding to "utf8mb4".Ben Cail
2024-05-03Fixed #35422 -- Fixed migrations crash when altering GeneratedField ↵Mariusz Felisiak
referencing rename field. Thanks Sarah Boyce for the report and Simon Charette for the implementation idea.
2023-11-27Fixed #34992 -- Fixed DatabaseFeatures.allows_group_by_selected_pks on ↵Nathaniel Conroy
MariaDB with ONLY_FULL_GROUP_BY sql mode. Regression in 041551d716b69ee7c81199eee86a2d10a72e15ab.
2023-11-02Refs #31300 -- Allowed testing GeneratedField without collation.Tim Graham
CockroachDB and Snowflake don't support it.
2023-09-19Fixed #34850 -- Dropped support for MariaDB 10.4.Mariusz Felisiak
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-03Refs #33713 -- Removed unnecessary version check in ↵Mariusz Felisiak
DatabaseFeatures.update_can_self_select on MariaDB. Follow up to 19297de2fe5a9c47e471c64249366f39fe12f16a.
2023-08-03Fixed #34761 -- Dropped support for MySQL < 8.0.11.Mariusz Felisiak
2023-08-02Fixed #33507 -- Used UUID data type on MariaDB 10.7+.Albert Defler
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
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-03Fixed #34523 -- Fixed TransactionManagementError in ↵Mariusz Felisiak
QuerySet.update_or_create() with MyISAM storage engine. QuerySet.update_or_create() uses nested atomic to handle possible integrity errors taking savepoints as way to mark back the connection as usable. Savepoints are not returned when uses_savepoints/can_release_savepoints feature flags are set to False. As a consequence, QuerySet.update_or_create() assumed the outer atomic block is tainted and raised TransactionManagementError. This commit partly reverts 331a460f8f2e4f447b68fba491464b68c9b21fd1. Thanks gatello-s for the report.
2023-05-01Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin
self-referential subqueries if supported.
2023-03-18Fixed #34421 -- Fixed QuerySet.update() on querysets in descending order by ↵hb6h057
annotations.
2023-02-21Refs #31445 -- Added test for nesting QuerySet.union().Mariusz Felisiak
This was fixed in MySQL 8.0.31.
2023-01-17Fixed #34255 -- Made PostgreSQL backend use client-side parameters binding ↵Mariusz Felisiak
with psycopg version 3. Thanks Guillaume Andreu Sabater for the report. Co-authored-by: Florian Apolloner <apollo13@users.noreply.github.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-05Removed redundant definition of DatabaseFeatures.can_release_savepoints on ↵Mariusz Felisiak
MySQL.
2022-11-07Fixed #31331 -- Switched MySQL to group by selected primary keys.Simon Charette
MySQL 5.7.15 supports group by functional dependences so there is no need to special case group by main table primary key anymore and special case the ONLY_FULL_GROUP_BY sql mode.
2022-10-25Fixed DatabaseFeatures.supports_select_(intersection/difference) on MariaDB ↵Mariusz Felisiak
and MySQL 8.0.31+.
2022-10-03Fixed #34070 -- Added subsecond support to Now() on SQLite and MySQL.Lily Foote
2022-07-27Fixed collation tests on MySQL 8.0.30+.Mariusz Felisiak
The utf8_ collations are renamed to utf8mb3_* on MySQL 8.0.30+.
2022-07-08Fixed #33718 -- Dropped support for MySQL 5.7.Mariusz Felisiak
2022-06-27Refs #33713 -- Removed unnecessary skip for MariaDB 10.3.Mariusz Felisiak
2022-06-27Fixed #33796 -- Fixed ordered combined queryset crash when used in subquery ↵Mariusz Felisiak
on PostgreSQL and MySQL. Thanks Shai Berger for the report. Regression in 30a01441347d5a2146af2944b29778fa0834d4be.
2022-06-17Fixed #28897 -- Fixed QuerySet.update() on querysets ordered by annotations.David Wobrock
2022-06-17Refs #28897 -- Added test for QuerySet.update() on querysets ordered by ↵David Wobrock
inline m2m annotation.
2022-06-01Fixed #32234 -- Made inspectdb inform about composite primary keys.Anv3sh
2022-05-18Fixed #33713 -- Dropped support for MariaDB 10.3.Mariusz Felisiak
2022-05-17Refs #33379 -- Fixed minimum supported version of MariaDB.Mariusz Felisiak
2022-05-12Refs #27064 -- Added RenameIndex migration operation.David Wobrock
2022-04-18Fixed DatabaseFeatures.uses_savepoints/can_release_savepoints and related ↵Mariusz Felisiak
tests with MyISAM storage engine.
2022-04-13Fixed DatabaseFeatures.supports_index_column_ordering and related tests with ↵Mariusz Felisiak
MyISAM storage engine.
2022-04-12Fixed DatabaseFeatures.supports_expression_indexes on MySQL with MyISAM.Mariusz Felisiak
2022-03-22Refs #30581 -- Fixed DatabaseFeatures.bare_select_suffix on MySQL < 8 and ↵Gagaro
MariaDB < 10.4.
2022-03-04Fixed #29865 -- Added logical XOR support for Q() and querysets.Ryan Heard
2022-02-26Fixed #33508 -- Fixed DatabaseFeatures.supports_index_column_ordering on ↵Alokik Vijay
MariaDB 10.8+.
2022-02-18Fixed #33379 -- Added minimum database version checks.Hasan Ramezani
Thanks Tim Graham for the review.
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