This issue started manifesting itself when nesting a combined subquery
relying on exclude() since 8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 but
sql.Query.combine never properly handled subqueries outer refs in the
first place, see QuerySetBitwiseOperationTests.test_subquery_aliases()
(refs #27149).
Thanks Raffaele Salmaso for the report.
Backport of 6d0cbe42c3d382e5393d4af48185c546bb0ada1f from main
Thanks Jared Lockhart for the report.
Regression in c36075ac1dddfa986340b1a5e15fe48833322372.
Backport of 34d1905712d33e72c76b3a55a4fc24abbd11be6c from main
Thanks Jan Pieter Waagmeester for the report.
Regression in 2d6179c819010f6a9d00835d5893c4593c0b85a0.
Backport of 4511d1459810037b91faa5b506e4f75c77aa72be from main.
Thanks Matt Westcott for the report.
Regression in 779e615e362108862f1681f965ee9e4f1d0ae6d2.
Backport of ca9872905559026af82000e46cde6f7dedc897b6 from main
Regression in b7b7df5fbcf44e6598396905136cab5a19e9faff.
Thanks Szymon Zmilczak for the report.
Backport of a77c9a4229cfef790ec18001b2cd18bd9c4aedbc from main
Different PROJ versions use different transformations, all are correct
as having a 1 meter accuracy.
These are differences in PROJ versions that cannot and should not be
handled in Django itself.
Thanks Jani Tiainen and David Smith for reports.
See: https://github.com/OSGeo/gdal/issues/3377
Backport of 2cd40263348a9c345a58c44d48922ac3b370a119 from main
In MTI or ForeignKey as primary key cases, it is required to fetch the attname
from the field instance on the remote model in order to reliably resolve the
to_field_name.
Backport of ceb4b9ee68dffc6ab0398886f1758f15f037c472 from main Backport of 03d0f12c823239812da21e5180aaa74dc6fd146e from main
Co-authored-by: Johannes Maron <info@johanneshoppe.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80.
Refs #31094, #31150.
Thanks Igor Pejic for the report.
Backport of 277eea8fcced7f04f3800617f189beb349a3212e from master
This fixes flushing test databases when two aliases point to the same
database.
Use a list() to store the test database aliases so the order remains
stable by following the order of the connections. Also, always use the
"default" database alias as the first alias to accommodate `migrate`.
Previously `migrate` could be executed on a secondary alias which
caused truncating the "default" database.
Backport of 06e5f7ae1639f1e275e7cc1076dc70ca3ebaa946 from master
The subquery pushdown only happens because another table is involved in
filter. It's not the distinct usage that causes the pushdown.
The distinct('description').order_by('pk') expression is not valid
because SELECT DISTINCT ON must match initial ORDER BY expressions
which is not the case here.
Backport of 4e8ecf0cb6ea36c45edb9cb86f0d63224e08097e from master
Thanks Kazantcev Andrey for the report.
Regression in f48f671223a20b161ca819cf7d6298e43b8ba5fe.
Backport of f131841c601b9d4884adcdb284b4213c2ad89231 from master
Thanks Florian Apolloner, Shai Berger, and Simon Charette for reviews.
Thanks Wang Baohua for the report.
Backport of 05413afa8c18cdb978fcdf470e09f7a12b234a23 from master.
This disables interpolation of constraint creation statements. Since
Constraint.create_sql interpolates its parameters instead of deferring
this responsibility to the backend connection it must disable
connection level parameters interpolation.
Backport of 42e8cf47c7ee2db238bf91197ea398126c546741 from master
Migrations cannot be recorded in the same transaction as its associated
DDL operations when some of it is deferred until the schema editor
context exits.
Regression in c86a3d80a25acd1887319198ca21a84c451014ad.
Backport of 0c42cdf0d2422f4c080e93594d5d15381d6e955e from master