summaryrefslogtreecommitdiff
path: root/django/db
AgeCommit message (Collapse)Author
2023-05-01Fixed #34528 -- Reduced Add/RemoveIndex operations when optimizing migrations.Mariusz Felisiak
2023-05-01Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin
self-referential subqueries if supported.
2023-04-24Refs #33766 -- Removed sql.Query.build_filtered_relation_q().Simon Charette
It was a copy of sql.Query._add_q that avoided JOIN updates.
2023-04-24Refs #33766 -- Removed unused Join.equals().Simon Charette
It's unused now that the specialized FilteredRelation.as_sql logic is no more.
2023-04-24Fixed #33766 -- Resolved FilteredRelation.condition at referencing time.Simon Charette
The previous implementation resolved condition at Join compilation time which required introducing a specialized expression resolving mode to alter the join reuse logic solely during that phase. FilteredRelation.condition is now resolved when the relation is first referenced which maintains the existing behavior while allowing the removal of the specialized resolving mode and address an issue where conditions couldn't spawn new joins.
2023-04-21Fixed #34505 -- Skipped varchar_pattern_ops/text_pattern_ops index creation ↵Petter Friberg
when db_collation is set in related field.
2023-04-18Refs #16055 -- Deprecated ↵David Wobrock
get_joining_columns()/get_reverse_joining_columns() methods.
2023-04-18Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock
relation on PostgreSQL.
2023-04-14Fixed #34486 -- Fixed DatabaseOperations.compose_sql() crash with no ↵Scott Macpherson
existing database connection on PostgreSQL. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
2023-04-11Fixed #34480 -- Fixed crash of annotations with Chr().Jacob Walls
2023-04-07Fixed #34470 -- Enforced UTF-8 encoding on PostgreSQL.Mariusz Felisiak
Regression in 6a2165816394ab4bb259f6171e82417e098e97a6.
2023-04-07Fixed #34466 -- Reallowed setting cursor_factory in DATABASES["options"] on ↵Anders Kaseorg
PostgreSQL. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
2023-04-07Fixed #34464 -- Fixed queryset aggregation over group by reference.Simon Charette
Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7. Refs #28477. Thanks Ian Cubitt for the report.
2023-04-05Fixed #34458 -- Fixed QuerySet.defer() crash on attribute names.Simon Charette
Thanks Andrew Cordery for the report. Regression in b3db6c8dcb5145f7d45eff517bcd96460475c879.
2023-04-04Fixed #34450 -- Fixed multi-valued JOIN reuse when filtering by expressions.Simon Charette
Thanks Roman Odaisky for the report.
2023-04-03Prevented PostgreSQL's DatabaseCreation._execute_create_test_db() from ↵Tim Graham
hiding clause-less exceptions. Regression in 3cafb783f3f711c7413ba2b8d7c8ff750bd4d6e1.
2023-03-28Fixed #34443 -- Fixed filtering by transforms on reverse relations.Mariusz Felisiak
Regression in ce6230aa976e8d963226a3956b45a8919215dbd8.
2023-03-28Refs #29799 -- Added field instance lookups to suggestions in FieldErrors.Mariusz Felisiak
Bug in cd1afd553f9c175ebccfc0f50e72b43b9604bd97.
2023-03-25Fixed #34437 -- Made values() resolving error mention selected annotations.Simon Charette
While the add_fields() call from set_values() does trigger validation it does so after annotations are masked resulting in them being excluded from the choices of valid options surfaced through a FieldError.
2023-03-24Fixed #28553 -- Fixed annotation mismatch with ↵David Wobrock
QuerySet.values()/values_list() on compound queries. Co-authored-by: Matthias Kestenholz <mk@feinheit.ch>
2023-03-21Fixed #34388 -- Allowed using choice enumeration types directly on model and ↵T. Franzel
form fields.
2023-03-20Fixed some typos in comments, docstrings, and tests.Liyang Zhang
2023-03-20Fixed #34420 -- Corrected the order of imports in generated migration files.Andy Chosak
2023-03-18Fixed #34421 -- Fixed QuerySet.update() on querysets in descending order by ↵hb6h057
annotations.
2023-03-14Refs #28329 -- Fixed Cast() with ForeignKey to integer fields on MySQL.David Wobrock
2023-03-10Fixed #34333 -- Fixed migration operations ordering when adding ↵Durval Carvalho
index/constraint on new foreign key. Thanks Simon Charette and David Wobrock for reviews.
2023-03-09Fixed #27397 -- Prevented integer overflows on integer field lookups.Simon Charette
This prevents a sqlite3 crash and address a potential DDoS vector on PostgreSQL caused by full-table-scans on overflows.
2023-03-08Fixed #34370 -- Added integer fields validation as 64-bit on SQLite.nabil-rady
2023-03-03Fixed #34378 -- Made QuerySet.in_bulk() not clear odering when id_list is ↵Ekaterina Vahrusheva
passed. This reverts 340eaded4e30cf25bcd4e9781d33a617fe9c0f84.
2023-03-02Refs #34320 -- Stopped recreating check constraints when renaming fields.Mariusz Felisiak
This also fixes test_rename_field_with_check_to_truncated_name() on MariaDB 10.5.2+ as ALTER TABLE ... RENAME COLUMN statement doesn't rename inline constraints.
2023-02-27Fixed #34368 -- Made subquery raise NotSupportedError when referencing outer ↵Simon Charette
window expression. Regression in f387d024fc75569d2a4a338bfda76cc2f328f627. Co-authored-by: Jannis Vajen <jvajen@gmail.com>
2023-02-27Fixed #34372 -- Fixed queryset crash on order by aggregation using OrderBy.Simon Charette
Regression in 278881e37619278789942513916acafaa88d26f3 caused by a lack of expression copying when an OrderBy expression is explicitly provided. Thanks Jannis Vajen for the report and regression test.
2023-02-24Fixed #34366 -- Reduced AlterField operations when optimizing migrations.Laurent Tramoy
2023-02-23Refs #30060, Refs #34217 -- Made SchemaEditor not generate SQL for ↵Mariusz Felisiak
CheckConstraint if not supported. The new logic mirrors the logic in SchemaEditor._delete_check_sql() added in 68ef274bc505cd44f305c03cbf84cf08826200a8. Thanks Tim Graham for the report.
2023-02-23Fixed #34338 -- Allowed customizing code of ValidationError in ↵Xavier Fernandez
BaseConstraint and subclasses.
2023-02-23Refs #33829 -- Added violation_error_message to constraints' __repr__().Xavier Fernandez
2023-02-22Fixed #34355 -- Deprecated passing positional arguments to BaseConstraint.Xavier Fernandez
2023-02-21Refs #31445 -- Added test for nesting QuerySet.union().Mariusz Felisiak
This was fixed in MySQL 8.0.31.
2023-02-20Fixed #34346 -- Ordered selected expressions by position.Simon Charette
Used the same approach as for #34176 by using selected expressions position to prevent ambiguous aliases in collisions. Thanks henribru for the report. Regression in 04518e310d4552ff7595a34f5a7f93487d78a406.
2023-02-18Refs #34176 -- Adjusted group by position variables naming to follow SQL spec.Simon Charette
This avoids conceptual collisions with the notion of indices.
2023-02-15Fixed #34320 -- Make sure constraints names are obtained from truncated ↵nabil-rady
columns names.
2023-02-14Fixed #34250 -- Fixed renaming model with m2m relation to a model with the ↵DevilsAutumn
same name.
2023-02-14Fixed #34280 -- Allowed specifying different field values for create ↵tschilling
operation in QuerySet.update_or_create().
2023-02-08Fixed #34319 -- Fixed Model.validate_constraints() crash on ValidationError ↵Mariusz Felisiak
with no code. Thanks Mateusz Kurowski for the report. Regression in 667105877e6723c6985399803a364848891513cc.
2023-02-06Made PostgreSQL's SchemaEditor._create_index_sql() respect the "sql" argument.Dan Glass
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2023-01-31Fixed #34304 -- Made MySQL's SchemaEditor.remove_constraint() don't create ↵sag᠎e
foreign key index when unique constraint is ignored. Regression in b731e8841558ee4caaba766c83f34ea9c7004f8b.
2023-01-27Refs #34255 -- Skipped test_group_by_nested_expression_with_params test on ↵Mariusz Felisiak
PostgreSQL when server-side binding cursors are used. Thanks Tim Graham for the review.
2023-01-26Fixed #34254 -- Fixed return value of Exists() with empty queryset.Raj Desai
Thanks Simon Charette for reviews.
2023-01-26Fixed #34291 -- Fixed Meta.constraints validation crash on UniqueConstraint ↵Mariusz Felisiak
with ordered expressions. Thanks Dan F for the report. Bug in 667105877e6723c6985399803a364848891513cc.