summaryrefslogtreecommitdiff
path: root/django/db
AgeCommit message (Collapse)Author
2018-12-17[2.0.x] Fixed #30023 -- Prevented SQLite schema alterations while foreign ↵Simon Charette
key checks are enabled. Prior to this change foreign key constraint references could be left pointing at tables dropped during operations simulating unsupported table alterations because of an unexpected failure to disable foreign key constraint checks. SQLite3 does not allow disabling such checks while in a transaction so they must be disabled beforehand. Thanks ezaquarii for the report and Carlton and Tim for the review. Backport of 315357ad25a6590e7f4564ec2e56a22132b09001 from master.
2018-12-07[2.0.x] Fixed #29182 -- Fixed schema table alteration on SQLite 3.26+.Simon Charette
SQLite 3.26 repoints foreign key constraints on table renames even when foreign_keys pragma is off which breaks every operation that requires a table rebuild to simulate unsupported ALTER TABLE statements. The newly introduced legacy_alter_table pragma disables this behavior and restores the previous schema editor assumptions. Thanks Florian Apolloner, Christoph Trassl, Chris Lamb for the report and troubleshooting assistance. Backport of c8ffdbe514b55ff5c9a2b8cb8bbdf2d3978c188f from master.
2018-10-24[2.0.x] Fixed F841 flake8 warning.Mariusz Felisiak
Backport of 641742528a8babbede92890bc0bef50a255c1bbb from master.
2018-08-02[2.0.x] Fixed #29499 -- Fixed race condition in QuerySet.update_or_create().Michael Sanders
A race condition happened when the object didn't already exist and another process/thread created the object before update_or_create() did and then attempted to update the object, also before update_or_create() saved the object. The update by the other process/thread could be lost. Backport of 271542dad1686c438f658aa6220982495db09797 from master
2018-07-05[2.0.x] Fixed #29544 -- Fixed regex lookup on MariaDB.Michal Čihař
Regression in 42490768441701bc02255b22df8e6894cbe487c7. Backport of 39e287d8bff50e9f91f3f4471088c1946aa6a76c from master
2018-06-28[2.0.x] Refs #28814 -- Fixed migrations crash with namespace packages on ↵Tim Graham
Python 3.7. Due to https://bugs.python.org/issue32303. Backport of 0f0a07ac278dc2be6da81e519188f77e2a2a00cf from master
2018-06-20[2.0.x] Refs #29451 -- Fixed regex/iregex lookups on MySQL 8.Tom
Backport of 42490768441701bc02255b22df8e6894cbe487c7 from master
2018-05-27[2.0.x] Fixed #29416 -- Removed unnecesary subquery from GROUP BY clause on ↵Mariusz Felisiak
MySQL when using a RawSQL annotation. Regression in 1d070d027c218285b66c0bde8079034b33a87f11. Backport of 4ab1f559e8d1264bcb20bb497988973194f5d8f2 from master
2018-04-17[2.0.x] Fixed #29334 -- Updated pypi.python.org URLs to pypi.org.Brett Cannon
Backport of 64b74804c537b12d4cca64f7cb529c0478b4c4d9 from master
2018-04-13[2.0.x] Fixed #29286 -- Fixed column mismatch crash with QuerySet.values() ↵Mariusz Felisiak
or values_list() after combining an annotated and unannotated queryset with union(), difference(), or intersection(). Regression in a0c03c62a8ac586e5be5b21393c925afa581efaf. Thanks Tim Graham and Carlton Gibson for reviews. Backport of 0b66c3b442875627fa6daef4ac1e90900d74290b from master
2018-04-11[2.0.x] Fixed #29193 -- Prevented unnecessary foreign key drops when ↵Jeremy Bowman
altering a unique field. Stopped dropping and recreating foreign key constraints on other fields in the same table as the one which is actually being altered in an AlterField operation. Regression in c3e0adcad8d8ba94b33cabd137056166ed36dae0. Backport of ee17bb8a67a9e7e688da6e6f4b3be1b3a69c09b0 from master
2018-03-19[2.0.x] Fixed #29229 -- Fixed column mismatch crash when combining two ↵Amr Anwar
annotated values_list() querysets with union(), difference(), or intersection(). Regression in 7316720603821ebb64dfe8fa592ba6edcef5f3e. Backport of a0c03c62a8ac586e5be5b21393c925afa581efaf from master
2018-03-08[2.0.x] Fixed #29195 -- Fixed Exists.output_field resolution on ↵Simon Charette
single-valued queries. The Subquery class which Exists inherits from defaulted to using single-valued querie's field if no output_field was explicitly specified on initialization which was bypassing the Exists.output_field defined at the class level. Moving Subquery's dynamic output_field resolution to _resolve_output_field should make sure the fallback logic is only performed if required. Regression in 08654a99bbdd09049d682ae57cc94241534b29f0. Thanks Oli Warner for the detailed report. Backport of 277ed072094ad87fc6b2c4669f21d43b1f39043c from master
2018-03-01[2.0.x] Fixed #29172 -- Fixed crash with Window expression in a subquery.Tomáš Ehrlich
Backport of fa352626c2a80bcdcd0fc6492b5fd5130490f05e from master
2018-02-28[2.0.x] Fixed #29166 -- Fixed crash in When() expression with a list argument.Mariusz Felisiak
Thanks Matthew Pava for the report and Tim Graham and Carlton Gibson for reviews. Regression in 19b2dfd1bfe7fd716dd3d8bfa5f972070d83b42f. Backport of 54f80430be4a9adf1fc00b4ca17547415fafc69b from master
2018-02-20[2.0.x] Removed blank lines per isort 4.3.0.Tim Graham
2018-02-12[2.0.x] Refs #29125 -- Made Q.deconstruct() omit 'query_utils' in the path ↵Tim Graham
and _connector='AND' since it's a default value. Backport of 9ba3df82402e7e23b353da20aea6894935241ef9 from master
2018-02-12[2.0.x] Fixed #29125 -- Made Q.deconstruct() deterministic with multiple ↵Tim Graham
keyword arguments. Backport of b95c49c954e3b75678bb258e9fb2ec30d0d960bb from master
2018-02-10[2.0.x] Fixed #29118 -- Fixed crash with QuerySet.order_by(Exists(...)).Raphael Gaschignard
Backport of bf26f66029bca94b007a2452679ac004598364a6 from master
2018-02-08[2.0.x] Fixed #29108 -- Fixed crash in aggregation of ↵Simon Charette
distinct+ordered+sliced querysets. Regression in 4acae21846f6212aa992763e587c7e201828d7b0. Thanks Stephen Brooks for the report. Backport of d61fe246015aa4fdc6dcb837ffb1442fa71ae586 from master
2018-01-31[2.0.x] Fixed #29091 -- Fixed makemigrations crash if migrations directory ↵Tim Graham
doesn't have __init__.py. Regression in aadd3aeb2ba3153e35bd805c80c901f289a6f333. Backport of 0a37ea56d05208e31ed2f29fdffca65b6d92fa2e from master
2018-01-26[2.0.x] Fixed #29067 -- Fixed regression in QuerySet.values_list(..., ↵Jon Dufresne
flat=True) followed by annotate(). Regression in 4dfd6b88d520b43b6363946e5ee58ba14cd1efe6. Backport of 3187c89d6f8c60ca7e78093d5b37e0709e71cea9 from master
2018-01-13[2.0.x] Fixed #29016 -- Fixed incorrect foreign key nullification on related ↵Étienne Loks
instance deletion. Backport of 9a621edf624a4eb1f1645fca628a9e432f0de776 from master
2017-12-26[2.0.x] Fixed #28944 -- Fixed crash when chaining values()/values_list() ↵Ran Benita
after QuerySet.select_for_update(of=()). Backport of c21f158295d92e35caf96436bfdbbff554fc5569 from master
2017-12-22[2.0.x] Fixed #28884 -- Fixed crash on SQLite when renaming a field in a ↵Simon Charette
model referenced by a ManyToManyField. Introspected database constraints instead of relying on _meta.related_objects to determine whether or not a table or a column is referenced on rename operations. This has the side effect of ignoring both db_constraint=False and virtual fields such as GenericRelation which aren't backend by database level constraints and thus shouldn't prevent the rename operations from being performed in a transaction. Regression in 095c1aaa898bed40568009db836aa8434f1b983d. Thanks Tim for the additional tests and edits, and Mariusz for the review. Backport of 9f7772e098439f9edea3d25ab127539fc514eeb2 from master
2017-12-12[2.0.x] Fixed #28915 -- Prevented SQLite from truncating trailing zeros in ↵Sergey Fedoseev
the fractional part of DecimalField. This reverts commit a146b65628e702a9a3ed5be21542ca45366fbb29 and adds a test for the regression. Backport of 6fd6d8383f48ea2fe4e058725fa30529a083e9a5 from master
2017-12-12[2.0.x] Refs #27985 -- Reallowed using __exact=None as an alias for ↵Sergey Fedoseev
__isnull=True if a custom lookup class with lookup_name != None is registered as the exact lookup. Regression in 58da81a5a372a69f0bac801c412b57f3cce5f188 and prerequisite for refs #28896. Backport of 10bfa876be59feec24bb6a40fa11bece808ee405 from master
2017-12-05[2.0.x] Refs #28876 -- Fixed incorrect foreign key constraint name for ↵Mariusz Felisiak
models with quoted db_table. Thanks Simon Charette and Tim Graham for the review and Carlos E. C. Leite for the report. Backport of fc48047586a8f92262f55d9d2bfb976325844b23 from master
2017-12-05[2.0.x] Refs #28876 -- Fixed incorrect class-based model index name ↵Mariusz Felisiak
generation for models with quoted db_table. Thanks Simon Charette and Tim Graham for the review and Carlos E. C. Leite for the report. Backport of f79d9a322c6008e5fada1453aebfb56afc316cc8 from master
2017-12-01[2.0.x] Fixed #28849 -- Fixed referenced table and column rename on SQLite.Simon Charette
Thanks Ramiro for the input and Tim for the review. Backport of 095c1aaa898bed40568009db836aa8434f1b983d from master
2017-12-01[2.0.x] Fixed #28863 -- Fixed filter on annotation that contains Q.Sergey Fedoseev
Backport of cf12257db23fa248c89a3da3f718aa01a50ca659 from master
2017-12-01[2.0.x] Fixed #28305 -- Fixed "Cannot change column 'x': used in a foreign ↵Tim Graham
key constraint" crash on MySQL with a sequence of AlterField or RenameField operations. Regression in 45ded053b1f4320284aa5dac63052f6d1baefea9. Backport of c3e0adcad8d8ba94b33cabd137056166ed36dae0 from master
2017-11-29[2.0.x] Fixed #28702 -- Made query lookups for CIText fields use citext.Mads Jensen
Backport of f0a68c25118786d47041d0a435b2afa953be3c86 from master
2017-11-28[2.0.x] Fixed #28837 -- Fixed test client crash if an exception with more ↵Nicolas Delaby
than one arg is raised. Also removed usage of the problematic pattern elsewhere. Regression in 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba. Backport of 746caf3ef821dbf7588797cb2600fa81b9df9d1d from master
2017-11-27[2.0.x] Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered ↵Raphael Michel
subquery that uses nulls_first/nulls_last. Backport of 616f468760e4984915bb2ccca6b9eb3d80ddadb0 from master
2017-11-21[2.0.x] Fixed #28817 -- Made QuerySet.iterator() use server-side cursors ↵Dražen Odobašić
after values() and values_list(). Backport of d97f026a7ab5212192426e45121f7a52751a2044 from master
2017-11-20[2.0.x] Fixed #28804 -- Fixed "Unknown system variable ↵Tim Graham
'transaction_isolation'" on MariaDB. Regression in 967450a3bf940c43db891fe1e2ef3bcf73456ff8. Backport of e3c852cbd609484b272f563f3c21066fb12ef7f8 from master
2017-11-15[2.0.x] Fixed #28792 -- Fixed index name truncation of namespaced tables.Simon Charette
Refs #27458, #27843. Thanks Tim and Mariusz for the review. Backport of ee85ef8315db839e5723dea19d8b971420a2ebb4 from master
2017-11-14[2.0.x] Fixed #28794 -- Fixed tx_isolation deprecation warning on MySQL 5.7.20+.Sergey Fedoseev
Backport of 967450a3bf940c43db891fe1e2ef3bcf73456ff8 from master
2017-11-12[2.0.x] Fixed #28781 -- Added QuerySet.values()/values_list() support for ↵Mariusz Felisiak
union(), difference(), and intersection(). Thanks Tim Graham for the review. Backport of 2d3cc94284674638c334670903d49565039d77ae from master
2017-11-06[2.0.x] Fixed #28776 -- Fixed a/an/and typos in docs and comments.Дилян Палаузов
Backport of 6c0042430e3618ce5c276d195d92a6b884daa3a3 from master
2017-10-31[2.0.x] Fixed #28750 -- Allowed models to define ↵Charlie Denton
Meta.manager_inheritance_from_future for backwards compatibility. Refs 631f4ab06112aca5bd6a57b81159048f936050bf. Backport of cbe334918a0a80762249706a15b699714b5dc828 from master
2017-10-30[2.0.x] Fixed #28742 -- Fixed AttributeError crash when assigning None to ↵Paulo
cached reverse relations. Backport of fcfcf8aae470d893b0d2ef176434461edf9e9c4d from master
2017-10-28[2.0.x] Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE ↵Ran Benita
.. OF. Thanks Adam Chidlow for polishing the patch. Backport of 03049fb8d96ccd1f1ed0285486103542de42faba from master
2017-10-25[2.0.x] Fixed #28689 -- Fixed unquoted table names in Subquery SQL when ↵Mariusz Felisiak
using OuterRef. Regression in f48bc7c3dbd204eefb3c19016b1e4906ac26bee3. Backport of 81e357a7e19f35235cc998459a10213532727d4e from master
2017-10-21[2.0.x] Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last.Tomer Chachamu
Backport of 21a3a29dc9d138c248fd7922923b3ec710735c6c from master
2017-10-18[2.0.x] Fixed outdated comment in RelatedObjectDoesNotExist.Simon Charette
Backport of 0a69479b6c58c9eb420e688e436b6c6e41415613 from master
2017-10-16[2.0.x] Fixed #28497 -- Restored the ability to use sliced QuerySets with ↵Tim Graham
__exact. Regression in ec50937bcbe160e658ef881021402e156beb0eaf. Thanks Simon Charette for review. Backport of 1b73ccc4bf78af905f72f4658cf463f38ebf7b97 from master
2017-10-13[2.0.x] Corrected examples in related field descriptor docstrings.Simon Charette
Using lowercased model class names suggested that accessing the attribute from instances of the class returned an instance of the descriptor, but this is only the case when accessed from the model class. Backport of 9dd405973cc39c00e50e28869808fb0797fea2b4 from master
2017-10-12[2.0.x] Fixed #27846 -- Made Model.refresh_from_db() clear cached relations.Paulo
Backport of a7b5ad8b19a08d7d57302ece74f6e26d2887fd9f from master