1
0
mirror of https://github.com/django/django.git synced 2024-11-20 08:24:58 +00:00
Commit Graph

25 Commits

Author SHA1 Message Date
Mariusz Felisiak
83a36ac49a
Removed unnecessary trailing commas and spaces in various code. 2017-12-28 21:07:29 +01:00
Ed Morley
bfd42392ab Simplified tests with assertDoesNotOptimize(). 2017-01-25 13:52:44 -05:00
Claude Paroz
d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Ed Morley
7156a6c9c4 Fixed #27717 -- Allowed migration optimization across AlterModelOptions. 2017-01-10 18:38:48 -05:00
za
321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Sergey Fedoseev
7fc4c1db62 Fixed #26710 -- Made CreateModel.references_model() take app_label into account. 2016-06-06 11:49:45 -04:00
James Robert
417e083e55 Fixed #26521 -- Validated CreateModel bases, fields and managers for duplicates. 2016-04-27 12:43:56 -04:00
Simon Charette
729e0b086d Fixed #24109 -- Allowed RunSQL and RunPython operations to be elided.
Thanks to Markus Holtermann and Tim Graham for their review.
2016-01-23 14:19:03 -05:00
Dražen Odobašić
b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Flavio Curella
c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Markus Holtermann
e470f311d6 Fixed #24828 -- Allowed migration optimization across AlterFooTogether
The idea behind this change is, that AlterUniqueTogether,
AlterIndexTogether and AlterOrderWithRespectTo can always be moved after
an Add/Alter/Rename/RemoveField operation if they don't refer to the
respective field and are not empty sets / None.

Combined with the optimizations of duplicate AlterUniqueTogether,
AlterIndexTogether, and AlterOrderWithRespectTo operations from
128caa1e16, these operations are optimized
in a later round of the optimizer.

Thanks Tim Graham for the review.
2015-06-16 00:43:22 +02:00
Markus Holtermann
128caa1e16 Optimized duplicate AlterModelTable/AlterFooTogether/AlterOWRT
Thanks Andrew Godwin for the review.
2015-06-14 20:34:48 +02:00
Markus Holtermann
5bc412c35a Took AlterOrderWithRespectTo into account when optimizing migrations
Thanks Andrew Godwin for the review.
2015-06-14 20:34:34 +02:00
Simon Charette
be67400b47 Refs #24652 -- Used SimpleTestCase where appropriate. 2015-05-20 13:46:13 -04:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Markus Holtermann
1f03d2d924 Refs #23822 -- Made MigrationOptimizer aware of model managers 2015-01-07 17:33:04 -05:00
Patryk Zawadzki
21e21c7bc2 Fixed #23844 -- Used topological sort for migration operation dependency resolution.
This removes the concept of equality between operations to guarantee
compatilibity with Python 3.

Python 3 requires equality to result in identical object hashes. It's
impossible to implement a unique hash that preserves equality as
operations such as field creation depend on being able to accept
arbitrary dicts that cannot be hashed reliably.

Thanks Klaas van Schelven for the original patch in
13d613f800.
2014-11-20 12:49:49 -05:00
Andrew Godwin
b30d32ff24 Fixed #22875: Optimizer did not take through= into account. 2014-06-22 11:23:45 -07:00
Claude Paroz
e520a73eee Harmonized some PEP 0263 coding preambles 2014-05-15 19:58:41 +02:00
Alex Gaynor
e5b7045422 flake8 fixes 2013-11-06 20:00:48 -08:00
Andrew Godwin
106b019dc9 Massive migration optimiser improvements + RenameModel opn 2013-11-06 13:47:58 +00:00
Alex Gaynor
f67e18f39e Fixed all E251 violations 2013-11-03 10:17:58 -08:00
Tim Graham
36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Andrew Godwin
42f8666f6a Improve migration optimizer to be able to optimize through other ops 2013-10-16 11:09:33 +01:00
Andrew Godwin
a80d9ab0fe Initial version of MigrationOptimizer and tests 2013-10-02 17:34:22 +01:00