François Dupayrat
861638a307
Fixed #29568 -- Prevented unnecessary UPDATE queries creating child models.
2018-07-20 08:59:15 -04:00
Claude Paroz
65503ca097
Fixed #29040 -- Made test database creation messages use a consistent output stream.
2018-07-19 18:05:33 -04:00
Simon Charette
1e9b02a4c2
Refs #28862 -- Removed the FieldRelatedOptionOperation.reduce() optimization.
...
It isn't required anymore since AlterTogetherOperations can be reduced into
CreateModels which can reduce DeleteField operations.
2018-07-19 17:42:18 -04:00
Simon Charette
fc16015de4
Fixed #26906 -- Reduced alter together operations code duplication.
...
Thanks Akshesh Doshi for the initial patch.
2018-07-19 17:06:01 -04:00
Simon Charette
8e3f22f251
Fixed #27731 -- Implemented CreateModel/AlterFooOperation reduction.
...
This should alleviate the side effects of disabling the AlterFooOperation
reduction with RemoveField to fix refs #28862 during migration squashing
because CreateModel can perform a reduction with RemoveField.
Thanks Nick Pope for the review.
2018-07-19 17:06:01 -04:00
Simon Charette
ed7898e1b5
Fixed #28862 -- Disabled optimization of AlterFooTogether and RemoveField.
...
AlterFooTogether operations cannot be swapped with RemoveField operations on
the same model as they could be removing the the same field as well.
Since AlterFooTogether operations don't track what their previous value was,
it's impossible to determine whether or not the optimization is safe so the
only way to proceed is to disable the optimization.
Thanks Ramiro Morales for the in-depth analysis of the issue.
Refs #24828
2018-07-19 17:06:01 -04:00
Mariusz Felisiak
a73cf8110e
Removed duplicate words in various comments.
2018-07-18 11:54:15 -04:00
Viktor Danyliuk
6ae7aaa7d6
Fixed #29413 -- Prevented evaluation of QuerySet.get_or_create()/update_or_create() defaults unless needed.
...
Removed the logic added in 81e05a418d
which
was obsolete since dbffffa7dc
.
2018-07-16 22:08:43 -04:00
Josh Schneier
4d48ddd8f9
Fixed #28917 -- Prevented Paginator's unordered warning on EmptyQuerySet.
...
Thanks carltongibson for the idea and weijunji for the initial patch.
2018-07-16 14:28:47 -04:00
Mariusz Felisiak
dd3b470719
Fixed #29542 -- Fixed invalid SQL if a Subquery from the HAVING clause is used in the GROUP BY clause.
...
Thanks Tim Graham for the review.
2018-07-14 12:03:22 +02:00
Oliver Sauder
a07a49ee32
Fixed #29559 -- Fixed TransactionTestCase.reset_sequences for auto-created m2m through models.
2018-07-11 17:20:29 -04:00
Simon Charette
8a03445885
Removed in_between from Operation.reduce()'s signature.
...
It isn't used since FieldOperation.references_model() takes into
account models referenced by the field it's operating on.
2018-07-11 10:49:50 -04:00
Simon Charette
37cafbfb79
Fixed #27845 -- Allowed both right and left optimizations of operations.
...
Thanks Raphael Gaschignard for the suggestion.
2018-07-11 10:49:50 -04:00
Simon Charette
0025dd5eb4
Allowed RemoveField operations to be optimized through.
2018-07-11 10:49:50 -04:00
Simon Charette
50b8c98a0f
Relaxed FieldOperation.references_field remote field checking.
2018-07-11 10:49:50 -04:00
Simon Charette
013bcf57d5
Introduced ModelTuple to remove migrations boilerplate.
2018-07-11 10:49:50 -04:00
Simon Charette
ad82900ad9
Fixed #26720 -- Prevented invalid CreateModel optimizations of related fields.
2018-07-11 10:49:50 -04:00
Simon Charette
a97845a823
Fixed #27768 -- Allowed migration optimization of CreateModel order.
...
Thanks Ed Morley from Mozilla for the tests.
2018-07-11 10:49:50 -04:00
Simon Charette
d3a935f01f
Refs #27768 -- Reversed order of optimized and in-between operations.
...
Operations can only be optimized through if they don't reference any of the
state the operation they are compared against defines or alters, so it's
safe to reverse the order.
2018-07-11 10:49:50 -04:00
Ian Foote
952f05a6db
Fixed #11964 -- Added support for database check constraints.
2018-07-10 15:32:33 -04:00
Sergey Fedoseev
6fbfb5cb96
Removed Oracle's fetchmany() and fetchall() wrappers.
...
Follow up to e06cab2600
.
2018-07-10 15:03:09 -04:00
Mads Jensen
8e4a75e5d5
Deleted unused variable in SQLCompiler.get_related_selections().
...
Unused since 01d440fa1e
.
2018-07-10 09:15:19 -04:00
Tom Forbes
45c035c823
Refs #29548 -- Fixed non-GIS test failures on MariaDB.
2018-07-09 14:59:42 -04:00
Michal Čihař
39e287d8bf
Fixed #29544 -- Fixed regex lookup on MariaDB.
...
Regression in 4249076844
.
2018-07-05 12:11:49 -04:00
Mads Jensen
f1fc7d6b78
Refs #26608 -- Removed unneeded name attribute in window functions.
2018-07-05 11:38:07 -04:00
Junyi Jiao
a0b19a0f5b
Refs #28643 -- Added math database functions.
...
Thanks Nick Pope for much review.
2018-07-05 11:02:12 -04:00
Mariusz Felisiak
d7d32964ef
Fixed #29541 -- Fixed Cursor.execute() crash when setinputsizes() is called without arguments wit cx_Oracle 6.4.
2018-07-04 12:57:29 -04:00
Tim Graham
4009e1f2ab
Removed unused code in django.db.backends.utils.format_number().
2018-07-02 16:10:35 -04:00
Mariusz Felisiak
0e64e046a4
Fixed #29530 -- Fixed aliases ordering when chaining annotate() and filter().
2018-07-02 21:09:29 +02:00
Sergey Fedoseev
b49b59b029
Simplified SQLite's Decimal adapter.
2018-07-02 13:36:40 -04:00
Ian Foote
38cada7c94
Fixed #28077 -- Added support for PostgreSQL opclasses in Index.
...
Thanks Vinay Karanam for the initial patch.
2018-06-29 17:00:28 -04:00
Thomas Grainger
4fba321a45
Fixed #29480 -- Made MySQL backend retrieve constraint columns in their defined order.
2018-06-29 10:43:53 -04:00
Tim Graham
2ec151e35d
Fixed #29514 -- Reverted "Used datetime.timezone.utc instead of pytz.utc for better performance."
...
This reverts commit 27ca5ce19f
due to a
regression.
2018-06-28 11:14:26 -04:00
Tim Graham
b9cf764be6
Fixed #29517 -- Added support for SQLite column check constraints on positive integer fields.
2018-06-25 14:01:04 -04:00
Alexandr Tatarinov
7410618528
Fixed #29447 -- Made RelatedManager.set() pass bulk argument to clear().
2018-06-25 13:04:46 -04:00
Tim Graham
e7185a6514
Refs #29516 -- Reverted inadvertent change in Model.__init__().
2018-06-25 09:39:16 -04:00
Federico Bond
4c36414323
Fixed #29517 -- Rephrased error message when passing incorrect kwarg to model constructor
2018-06-25 09:30:58 +02:00
Tom
4249076844
Refs #29451 -- Fixed regex/iregex lookups on MySQL 8.
2018-06-20 10:57:28 -04:00
Nick Pope
b0fbfae093
Fixed #29503 -- Made __in lookup keep order of values in query.
...
Regression in 86eccdc8b6
.
2018-06-20 09:29:06 -04:00
Mariusz Felisiak
6dd4edb1b4
Fixed #29496 -- Fixed crash on Oracle when converting a non-unique field to primary key.
...
Thanks Tim Graham for the review.
2018-06-17 08:51:02 +02:00
Jeff
fcc4e251db
Fixed #29000 -- Fixed RenameModel's renaming of a M2M column when run after RenameField.
...
Regression in 45ded053b1
.
2018-06-15 11:51:09 -04:00
Tim Graham
c03e41712b
Refs #28748 -- Reallowed lazy model field choices.
...
Regression in 3aa9ab39cc
.
2018-05-29 21:43:38 -04:00
Paulo
6104875a2c
Fixed #29230 -- Fixed nested prefetches that clash with descriptors.
2018-05-27 21:45:51 -04:00
Mariusz Felisiak
4ab1f559e8
Fixed #29416 -- Removed unnecesary subquery from GROUP BY clause on MySQL when using a RawSQL annotation.
...
Regression in 1d070d027c
.
2018-05-27 18:25:19 -04:00
Markus Holtermann
e01fa015c0
Refs #27098 -- Removed unused introspection queries.
...
Unused since 578711c310
.
Thanks Ian Foote for finding this.
2018-05-26 16:29:02 +02:00
bakabiko
a7bc1aea03
Fixed #29380 -- Added support for QuerySet.select_for_update()'s nowait and skip_locked options on MySQL 8+.
2018-05-18 19:37:36 -04:00
olivierdalang
825f0beda8
Fixed #8936 -- Added a view permission and a read-only admin.
...
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz>
Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-05-16 06:44:55 -04:00
Paulo
265506bbc3
Refs #28834 -- Moved ancestor field cached value fallback to related fields descriptor.
2018-05-14 21:17:02 -04:00
Stefan R. Filipek
a5a2ceeb45
Fixed #27629 -- Added router.allow_relation() calls for assignments between unsaved model instances.
2018-05-10 20:42:44 -04:00
Tim Graham
7ac3008fe4
Refs #29350 -- Fixed 'invalid escape sequence' warning in SQLite introspection.
2018-05-08 10:42:24 -04:00