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
EnumMeta has a new keyword argument 'boundary' in Python 3.10. This
is a new mechanism that controls how out-of-range / invalid bits are
handled, see https://bugs.python.org/issue38250.
Backport of 5d9b065d3f93de056588dfee6f1776294dd8bab2 from master
The writing code index page is a better location for a newer contributor to
land, than the specific patch guidelines subpage.
Backport of aa29c57beea7e8e570f8a597ea806ca3e2b3431d from master
With the goal of guiding folks to the right destination:
* Improved wording of tutorial call-out.
* Added summary of page purpose.
* Added link to Writing code reference doc.
Backport of e733c9ac1746cedc78efabff340379f1c9ee47da 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.
Since this example was added 15 years ago in a8ccdd0fcd631e8e928ef20547e1fe3e313dc607, the ORM has gained the ability to do the `COUNT(*)` related query, so do it with the ORM to avoid misleading users that raw SQL is only supported from manager methods.
Backport of 59e503b6708d41a44f2aa320272de3e2ecb5d65c from master
Matched layout adjustment using flex from admin sidebar added in
d24ba1be7a53a113d19e2860c03aff9922efec24.
Filters would become squashed when viewport was
constrained or list display table became too wide.
Backport of 269a76714616fd7ad166a14113f3354bab8d9b65 from master
Updated tutorial to match change in 24e540fbd71bd2b0843e751bde61ad0052a811b3
allowing deletion of original extra inlines.
Backport of f4272d000af598018247fe9687dac0fd02a29a7c 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
This makes sure atomic recording of migration application is used when
the schema editor doesn't defer any statement.
Backport of 533a5835784b95335c8373b6d0b9495b3834e96e from master