Markus Holtermann
eeb88123e7
Fixed #24129 -- Added indicator that migrations are rendering the initial state
...
Thanks Tim Graham for the review.
2015-01-12 19:23:46 +01:00
Markus Holtermann
bbbed99f62
Fixed #24123 -- Used all available migrations to generate the initial migration state
...
Thanks Collin Anderson for the input when creating the patch and Tim Graham for the review.
2015-01-12 18:39:18 +01:00
Claude Paroz
68a439a18d
Removed supports_binary_field flag as all backends support them
...
It was mainly for MySQL on Python 3, but now the current
recommended MySQL driver for Python 3 (mysqlclient) does support
binary fields, it is unneeded. Refs #20377 .
2015-01-11 23:34:47 +01:00
Markus Holtermann
fdc2cc9487
Fixed #24110 -- Rewrote migration unapply to preserve intermediate states
2015-01-10 23:14:15 +01:00
Loic Bistuer
8f4877c89d
Fixed #22583 -- Allowed RunPython and RunSQL to provide hints to the db router.
...
Thanks Markus Holtermann and Tim Graham for the review.
2015-01-10 00:30:48 +07:00
Markus Holtermann
c8bac4b556
Fixed #24098 -- Added no-op attributes to RunPython and RunSQL
...
Thanks Loïc Bistuer and Tim Graham for the discussion and review.
2015-01-09 10:31:32 -05:00
Markus Holtermann
862ea825b5
Fixed #24093 -- Prevented MigrationWriter to write operation kwargs that are not explicitly deconstructed
2015-01-07 17:29:20 -07:00
Markus Holtermann
1f03d2d924
Refs #23822 -- Made MigrationOptimizer aware of model managers
2015-01-07 17:33:04 -05:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Markus Holtermann
e08318b4ef
Refs #23359 -- Removed double newline from output of migrate --list
...
Thanks Berker Peksag for the review.
2015-01-05 14:52:54 -05:00
Claude Paroz
1aa3e09c20
Fixed #23745 -- Reused states as much as possible in migrations
...
Thanks Tim Graham and Markus Holtermann for the reviews.
2015-01-02 15:37:10 +01:00
Claude Paroz
2a9c4b4901
Passed around the state between migrations
...
Refs #23745 .
2015-01-02 15:37:10 +01:00
Claude Paroz
a159b1facd
Replaced migration state render() by apps cached property
...
Refs #23745 .
2015-01-02 15:19:36 +01:00
Markus Holtermann
a1487deebf
Fixed #23359 -- Added showmigrations command to list migrations and plan.
...
Thanks to Collin Anderson, Tim Graham, Gabe Jackson, and Marc Tamlyn
for their input, ideas, and review.
2014-12-31 14:14:28 -05:00
Claude Paroz
51890ce889
Applied ignore_warnings to Django tests
2014-12-30 18:16:25 +01:00
Markus Holtermann
fca866763a
Added test for an intermediate swappable model change in migration state.
...
refs #22563
2014-12-30 10:01:25 -05:00
Markus Holtermann
623ccdd598
Fixed #23938 -- Added migration support for m2m to concrete fields and vice versa
...
Thanks to Michael D. Hoyle for the report and Tim Graham for the review.
2014-12-29 13:41:12 -05:00
Tim Graham
061caa5b38
Fixed #24037 -- Prevented data loss possibility when changing Meta.managed.
...
The migrations autodetector now issues AlterModelOptions operations for
Meta.managed changes instead of DeleteModel + CreateModel.
Thanks iambibhas for the report and Simon and Markus for review.
2014-12-23 14:25:31 -05:00
Oscar Ramirez
54085b0f9b
Fixed #23998 -- Added datetime.time support to migrations questioner.
2014-12-22 07:24:54 -05:00
Josh Schneier
9a23470072
Fixed #24017 -- Added python_2_unicode_compatible in db/migrations
2014-12-21 16:10:43 -05:00
Andriy Sokolovskiy
3dbbb8a89c
Fixed #23983 -- Fixed a crash in migrations when adding order_with_respect_to to non-empty table.
2014-12-16 10:48:49 -05:00
Diego Guimarães
c17d821fa7
Refs #23947 -- Improved migrations tests table cleanup.
...
Copied technique from schema tests.
2014-12-15 19:05:19 -05:00
Markus Holtermann
3ef50a772b
Fixed reverse test execution for migration manager tests
...
Thanks to Tim Graham for reporting the issue; refs #23822
2014-12-15 17:54:40 -05:00
Andriy Sokolovskiy
d8f3b86a76
Fixed #23405 -- Fixed makemigrations prompt when adding Text/CharField.
...
A default is no longer required.
2014-12-15 14:41:52 -05:00
Markus Holtermann
aa5ef0d4fc
Fixed #23822 -- Added support for serializing model managers in migration
...
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15 08:34:15 -05:00
Markus Holtermann
44927ba817
Fixed #23956 -- Fixed migration creation for multiple table inheritance
2014-12-11 13:28:21 -05:00
Gavin Wahl
dee4d23f7e
Fixed #23950 -- Prevented calling deconstruct on classes in MigrationWriter.
2014-12-03 08:22:29 -05:00
Claude Paroz
e11c6fd218
Fixed #23909 -- Prevented crash when collecting SQL for RunSQL
...
Thanks James Rivett-Carnac for the report and Markus Holtermann
for the review.
2014-12-01 20:26:40 +01:00
wrwrwr
b481c85697
Corrected a docstring in tests/migrations/test_operations.py.
2014-12-01 11:37:51 -05:00
wrwrwr
9136ceb6fb
Replaced router.routers usage with override_settings(DATABASE_ROUTERS); refs #23933 .
2014-12-01 11:34:15 -05:00
Markus Holtermann
d2202ec2d4
Fixed #23880 -- Added missing index_together handling for SQLite
2014-12-01 11:30:33 +07:00
Tim Heap
deb607648e
Fixed #23728 -- Added the --exit option to makemigrations.
...
If no changes that need migrations are found, `makemigrations --exit`
exits with error code 1.
2014-11-28 07:48:39 -05:00
Markus Holtermann
912ad03226
Fixed #23894 -- Made deconstruct methods favor kwargs over args
2014-11-28 06:05:56 -05:00
Tim Graham
392e11945f
Fixed flake8 warnings.
2014-11-25 11:20:40 -05:00
Luke Plant
ff3d746e8d
Fixed bug in circular dependency algo for migration dependencies.
...
Previous algo only worked if the first item was a part of the loop,
and you would get an infinite loop otherwise (see test).
To fix this, it was much easier to do a pre-pass.
A bonus is that you now get an error message that actually helps you debug
the dependency problem.
2014-11-25 15:37:34 +00:00
Andrzej Pragacz
72729f844e
Fixed #23794 -- Fixed migrations crash when removing a field that's part of index/unique_together.
2014-11-21 10:55:19 -05:00
Markus Holtermann
4c709cc0ef
Fixed duplicate index error on Oracle; refs #23859 .
...
Refers to regression introduced in 7b4a994599
2014-11-20 14:42:39 -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
Carl Meyer
51f2de1530
Added another migration-executor test to avoid regressions.
2014-11-19 19:43:12 -07:00
Carl Meyer
ab2819aa7b
Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards.
2014-11-19 16:11:44 -07:00
Carl Meyer
47b7f601ee
Fixed #23872 -- Removed sensitivity of migrations tests to CWD.
2014-11-19 15:03:47 -07:00
Markus Holtermann
2331650835
Cleaned up and reformatted autodetector tests
2014-11-19 11:09:38 -05:00
Markus Holtermann
f17acd5930
Formatted model states in autodetector tests
2014-11-19 11:09:38 -05:00
Stratos Moros
cf7a2a000e
Fixed #22248 -- Made RenameModel reversible
2014-11-19 14:11:35 +02:00
Tillmann Karras
d188101319
Fixed #23799 -- Made makemigrations respect --no-optimize.
...
Thanks to yamila-moreno for the idea of a skip message.
2014-11-18 07:37:06 +01:00
Markus Holtermann
7b4a994599
Fixed #23859 -- Fixed a migration crash when a field is renamed that is part of an index_together
2014-11-17 19:15:07 +01:00
Simon Charette
68ef44c565
Removed references to the deprecated assertRaisesRegexp method.
2014-11-16 02:12:36 +01:00
Andrew Godwin
c5def493d0
Fixed #23835 : Changed circular dependency in DFS to be less infinite
2014-11-15 17:39:02 +01:00
Tim Graham
83d104d61a
Revert "Use topological sort for migration operation dependency resolution"
...
This commit broke the tests on Python 3.
This reverts commit 13d613f800
.
2014-11-15 15:28:04 +01:00
Klaas van Schelven
13d613f800
Use topological sort for migration operation dependency resolution
...
rather than an ad-hoc algorithm
2014-11-15 14:45:42 +01:00