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

17 Commits

Author SHA1 Message Date
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