summaryrefslogtreecommitdiff
path: root/django/db
AgeCommit message (Collapse)Author
2020-03-03[3.0.x] Fixed #31150 -- Included subqueries that reference related fields in ↵Mariusz Felisiak
GROUP BY clauses. Thanks Johannes Hoppe for the report. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Co-authored-by: Simon Charette <charette.s@gmail.com> Backport of 7b8fa1653fde578ab3a496d9974ab1d4261b8b26 from master
2020-02-27[3.0.x] Fixed #31312 -- Properly ordered temporal subtraction params on MySQL.Simon Charette
Regression in 9bcbcd599abac91ea853b2fe10b784ba32df043e. Thanks rick2ricks for the report. Backport of 41ebe60728a15aa273f4d70de92f5246a89c3d4e from master
2020-02-18[3.0.x] Fixed #31271 -- Preserved ordering when unifying query parameters on ↵Mariusz Felisiak
Oracle. This caused misplacing parameters in logged SQL queries. Regression in 79065b55a70cd220820a260a1c54851b7be0615a. Thanks Hans Aarne Liblik for the report. Backport of 2a038521c4eabdc5f6d5026d3dd6d22868e329cd from master
2020-02-11[3.0.x] Fixed #31246 -- Fixed locking models in ↵Abhijeet Viswa
QuerySet.select_for_update(of=()) for related fields and parent link fields with multi-table inheritance. Partly regression in 0107e3d1058f653f66032f7fd3a0bd61e96bf782. Backport of 1712a76b9dfda1ef220395e62ea87079da8c9f6c from master
2020-02-03[3.0.x] Fixed #31217 -- Made QuerySet.values()/values_list() group by not ↵Mariusz Felisiak
selected annotations with aggregations used in order_by(). Regression in 59b4e99dd00b9c36d56055b889f96885995e4240. Thanks Jon Dufresne for the report and Simon Charette for the review. Backport of 6b178a3e930f72069f3cda2e6a09d1b320fc09ec from master
2020-01-29[3.0.x] Fixed #31212 -- Updated psycopg links to HTTPS and new location.Jon Dufresne
Backport of 958977f662d878c299b3599282f005c3469dbef9 from master
2020-01-15[3.0.x] Fixed #31124 -- Fixed setting of get_FOO_display() when overriding ↵Carlton Gibson
inherited choices. Regression in 2d38eb0ab9f78d68c083a5b78b1eca39027b279a Backport of 29c126bb349526b5f1cd78facbe9f25906f18563 from master
2020-01-15[3.0.x] Refs #31136 -- Made QuerySet.values()/values_list() group only by ↵Mariusz Felisiak
selected annotation. Regression in 0f843fdd5b9b2f2307148465cd60f4e1b2befbb4. Backport of 59b4e99dd00b9c36d56055b889f96885995e4240 from master
2020-01-11[3.0.x] Fixed #31155 -- Fixed a system check for the longest choice when a ↵Mariusz Felisiak
named group contains only non-string values. Regression in b6251956b69512bf230322bd7a49b629ca8455c6. Thanks Murat Guchetl for the report. Backport of 6f7998adc784032f4b8918ca2eea27537ea4cbbe from master
2020-01-10[3.0.x] Fixed #31154 -- Added support for using enumeration types in templates.Adam Johnson
Enumeration helpers are callables, so the template system tried to call them with no arguments. Thanks Rupert Baker for helping discover this. Backport of 5166097d7c80cab757e44f2d02f3d148fbbc2ff6 from master
2020-01-04[3.0.x] Fixed #31136 -- Disabled grouping by aliases on ↵Mariusz Felisiak
QuerySet.values()/values_list(). Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Thanks Sigurd Ljødal for the report. Backport of 0f843fdd5b9b2f2307148465cd60f4e1b2befbb4 from master
2020-01-03[3.0.x] Fixed #31133 -- Fixed crash when subtracting against a subquery ↵Simon Charette
annotation. The subtract_temporals() database operation was not handling expressions returning SQL params in mixed database types. Regression in 35431298226165986ad07e91f9d3aca721ff38ec. Thanks Reupen Shah for the report. Backport of 9bcbcd599abac91ea853b2fe10b784ba32df043e from master
2019-12-30[3.0.x] Fixed #31071 -- Disabled insert optimization for primary keys with ↵Simon Charette
defaults when loading fixtures. Model.save_base() is called directly when loading fixtures and assumes existing rows will be updated. Branching of "raw" allows to maintain the optimization introduced in #29260 while supporting this edge case. Regression in 85458e94e38c20e57939947ee515a1a53689659f. Thanks Reupen Shah for the report. Backport of 5779cc938a34eb96815c7a40ded2c8f6c8087c58 from master
2019-12-23[3.0.x] Fixed #31106 -- Fixed migrations crash on PostgreSQL 10+ when adding ↵Mariusz Felisiak
FK constraints inline and changing data. This allows adding foreign key constraints inline and changing data in the same migration on PostgreSQL 10+. Regression in 738faf9da2a5cd03148a36375db80746c99c9623. Thanks Janne Rönkkö for the report and Simon Charette for the implementation idea and review. Backport of 22ce5d0031bd795ade081394043833e82046016c from master
2019-12-23[3.0.x] Fixed #31109 -- Disabled grouping by aliases on QuerySet.exists().Simon Charette
Clearing the SELECT clause in Query.has_results was orphaning GROUP BY references to it. Thanks Thierry Bastian for the report and Baptiste Mispelon for the bisect. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Backport of 720de4d0441fcfdb543051389c70efbe66ed962a from master
2019-12-19[3.0.x] Fixed #31094 -- Included columns referenced by subqueries in GROUP ↵Simon Charette
BY on aggregations. Thanks Johannes Hoppe for the report. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Backport of 5a4d7285bd10bd40d9f7e574a7c421eb21094858 from master
2019-12-06[3.0.x] Fixed #31060 -- Reallowed window expressions to be used in ↵Alex Aktsipetrov
conditions outside of queryset filters. Regression in 4edad1ddf6203326e0be4bdb105beecb0fe454c4. Thanks utapyngo for the report. Backport of bf12273db4e53779546e2ac7b65c0ce8e3c8a640 from master.
2019-12-02[3.0.x] Fixed #30953 -- Made select_for_update() lock queryset's model when ↵Mariusz Felisiak
using "self" with multi-table inheritance. Thanks Abhijeet Viswa for the report and initial patch. Backport of 0107e3d1058f653f66032f7fd3a0bd61e96bf782 from master
2019-11-25[3.0.x] Fixed #27914 -- Fixed serialization of nested classes in migrations.John Bowen
Backport of 29d8198841ea39af44f3bc835d646e642d498475 from master
2019-11-18[3.0.x] Fixed #30986 -- Fixed queryset crash when filtering against boolean ↵Mariusz Felisiak
RawSQL expressions on Oracle. Backport of 8685e764efd2957085762d9249e07794d9a58dcb from master
2019-11-13[3.0.x] Fixed #30971 -- Prevented Query.resolve_lookup_value() from coercing ↵George Marshall
list values to tuples. Regression in 8a281aa7fe76a9da2284f943964a9413697cff1f. Backport of 8be79984dce7d819879a6e594ca69c5f95a08378 from master
2019-11-05[3.0.x] Fixed DatabaseFeatures.has_select_for_update_nowait on MariaDB 10.3+.Mariusz Felisiak
Thanks Kola Erinoso for the report. Backport of a20ea33ca66bafd38bfce1a73221384b8aa37170 from master
2019-11-04[3.0.x] Fixed #30931 -- Restored ability to override Model.get_FIELD_display().Carlton Gibson
Thanks Sergey Fedoseev for the implementation idea. Regression in a68ea231012434b522ce45c513d84add516afa60. Backport of 2d38eb0ab9f78d68c083a5b78b1eca39027b279a from master
2019-10-25[3.0.x] Fixed #30902 -- Added __str__() for model choice enums.Carlton Gibson
Allows expected behavior when cast to str, also matching behaviour of created instances with those fetched from the DB. Thanks to Simon Charette, Nick Pope, and Shai Berger for reviews. Backport of dbcd7b064e7278614f29fc45468d461e263d4da7 from master
2019-10-24[3.0.x] Fixed #30903 -- Fixed migrations crash on PostgreSQL when adding ↵Hannes Ljungberg
Index with opclasses and ordering. Backport of fa5f3291e7f2611d53e64ab481ebe951b0161791 from master
2019-10-14[3.0.x] Fixed #30868 -- Prevented unnecessary AlterField when renaming a ↵Simon Charette
referenced pk. Regression introduced by dcdd219ee1, refs #25817. Thanks Carlos E. C. Leite for the report and Mariusz for the bisect. Backport of 2839659b42ef80038152768b6cedae1016c59d90 from master
2019-10-11[3.0.x] Fixed #30854 -- Fixed QuerySet.select_related() with multiple ↵Hasan Ramezani
FilteredRelations. Backport of 6a75cea76a98c08bf2e20d787be9b14c2cd94860 from master.
2019-10-03[3.0.x] Refs #27914 -- Fixed serialization of nested enum.Enum classes in ↵Hasan Ramezani
migrations. Backport of 6452112640081ac8838147a8ba192c45879203d8 from master
2019-10-01[3.0.x] Fixed typo in BulkInsertMapper constant name.Mariusz Felisiak
Backport of 67e7dffe9543aff259f63c8f12d15642fe7be100 from master
2019-10-01[3.0.x] Fixed #30510 -- Fixed crash of QuerySet.bulk_create() with ↵Ahmet Kucuk
mixed-length texts on Oracle. Text with more than 4000 characters must be set to as a CLOB on Oracle what caused a mixed datatype error (ORA-01790) when shorter text appeared in the same operation. Backport of dc890bef5ad8e9fccce55f3e64af72103ea6e8c1 from master
2019-09-30[3.0.x] Fixed #30774 -- Made serialization in migrations use members names ↵Hasan Ramezani
for Enums. Backport of f0adf3b9b7a19cdee05368ff0c0c2d087f011180 from master
2019-09-27[3.0.x] Fixed #30798 -- Fixed Meta.ordering validation for pk of related fields.Hasan Ramezani
Regression in 440505cb2cadbe1a5b9fba246bcde6c04f51d07e. Backport of 95a11578ce41de1e152fe7d173f109e280aebd6d from master
2019-09-27[3.0.x] Refs #30798 -- Prevented chaining fields from the same related model ↵Hasan Ramezani
multiple times in model Meta.ordering. Backport of c7944628a1979453468d67818c63957532d396d8 from master
2019-09-25[3.0.x] Fixed #30800 -- Fixed migrations crash when altering a field with ↵Mariusz Felisiak
custom db_type(). Regression in 1378d665a1c85897d951f2ca9618b848fdbba2e7. Backport of 580e644f24f1c5ae5b94784fb73a9953a178fd26 from master
2019-09-24[3.0.x] Fixed #30796 -- Prevented select_related() from mutating a queryset ↵Simon Charette
on chaining. Thanks Darren Maki for the report. Backport of 37f8f293775d0b672da8ae369d9a4e17f1db7851 from master
2019-09-23[3.0.x] Fixed #13296 -- Fixed ordering by Options.order_with_respect_to ↵Hasan Ramezani
after deleting objects. Thanks Simon Meers for the original patch. Backport of f97bbad908df128189eff77d98af9a25ed1ecf23 from master
2019-09-20[3.0.x] Fixed #30771 -- Fixed exact lookup against queries with selected ↵James Timmins
columns. Use pre-existing select fields (and thereby GROUP BY fields) from subquery if they were specified, instead of always defaulting to pk. Thanks Aur Saraf for the report and Simon Charette for guidance. Backport of 0719edcd5fed56157ffb3323a8f634aa5e8f9a80 from master
2019-09-20[3.0.x] Fixed #30786 -- Used CONVERT_TZ to check if the time zone ↵Andrew
definitions are installed on MySQL. Replaced a timezone check in the MySQL backend with one that doesn't require access to the mysql.time_zone database. Backport of 3346b78a8a872286a245d1e77ef4718fc5e6be1a from master
2019-09-11[3.0.x] Fixed #30591 -- Fixed recreation of foreign key constraints on MySQL ↵Adnan Umer
when altering type of referenced unique field. Thanks Mariusz Felisiak for tests and Matthijs Kooijman for investigation and initial patch. Backport of 241deed2590bcb1d8c45271d44c86eaedfb57119 from master
2019-09-10Fixed #30754 -- Prevented inclusion of aliases in partial index conditions.Simon Charette
SQLite doesn't repoint table aliases in partial index conditions on table rename which breaks the documented table alteration procedure. Thanks Pēteris Caune for the report.
2019-09-09Fixed #28107 -- Added ↵Vojtech Bocek
DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models.
2019-09-09Refs #29444 -- Allowed returning multiple fields from INSERT statements on ↵Johannes Hoppe
PostgreSQL. Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and Mariusz Felisiak for reviews.
2019-09-09Refs #29444 -- Fixed DateField constructor in ↵Johannes Hoppe
db.backends.oracle.utils.InsertVar.
2019-09-09Fixed #30757 -- Added a system check to ensure max_length fits the longest ↵Nick Pope
choice.
2019-09-06Fixed DatabaseFeatures.can_introspect_check_constraints on MariaDB < ↵Mariusz Felisiak
10.2.22, 10.3.0 - 10.3.9. Regression in e2c6a0858d7d9ad85eda353076a5b46608b704a9.
2019-09-05Fixed #30750 -- Added support for check constraints on MySQL 8.0.16+.Mariusz Felisiak
2019-09-04Fixed #27910 -- Added enumeration helpers for use in Field.choices.Shai Berger
These classes can serve as a base class for user enums, supporting translatable human-readable names, or names automatically inferred from the enum member name. Additional properties make it easy to access the list of names, values and display labels. Thanks to the following for ideas and reviews: Carlton Gibson, Fran Hrženjak, Ian Foote, Mariusz Felisiak, Shai Berger. Co-authored-by: Shai Berger <shai@platonix.com> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-09-03Fixed #30691 -- Made migrations autodetector find dependencies for foreign ↵Viktor Lomakin
keys altering.
2019-09-03Refs #29444 -- Made db.backends.oracle.utils.InsertVar use str as default.Johannes Hoppe
2019-09-02Fixed #30739 -- Fixed exclusion of multi-valued lookup against outer rhs.Simon Charette
OuterRef right hand sides have to be nested, just like F rhs have to, during the subquery pushdown split_exclude performs to ensure they are resolved against the outer query aliases.