1
0
mirror of https://github.com/django/django.git synced 2025-01-26 18:19:18 +00:00

474 Commits

Author SHA1 Message Date
Tim Graham
5c56ce7a3f [1.10.x] Reverted "Fixed #25388 -- Added an option to allow disabling of migrations during test database creation"
This reverts commit 157d7f1f1de4705daddebb77f21bd7097a74513d since it
disables migrations all the time, not just during tests.

Backport of 944e66cb1db6614ef0644b9030dd1d75e950767c from master
2016-07-14 09:22:06 -04:00
Loïc Bistuer
a2af2420ce [1.10.x] Fixed #26881 -- Fixed duplicate managers in migrations.
When both parent and child models had managers with the same name and
a migrations opt-in both were added to the migration state.

Backport of dab83e5ba108c08a04ae400ac5354fd73e26c6f5 from master
2016-07-09 18:12:18 +07:00
akki
7f249e73dd [1.10.x] Fixed #26795 -- Factored out get_changes() in test_autodetector.py.
Backport of ca77b509059831b055a3b735ff77e042f8e1c0eb from master
2016-06-24 22:01:56 -04:00
Loïc Bistuer
0f23bcebdf [1.10.x] Fixed #26643 -- Prevented unnecessary AlterModelManagers operations caused by the manager inheritance refactor.
This also makes migrations respect the base_manager_name and
default_manager_name model options.

Thanks Anthony King and Matthew Schinckel for the initial patches.

Backport of 2eb7cb2fffcc382979d0731370de26b051d04659 from master
2016-06-20 12:56:37 -04:00
Jon Dufresne
13d60298ea [1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite.
Backport of 4f336f66523001b009ab038b10848508fd208b3b from master
2016-06-16 14:21:14 -04:00
Vytis Banaitis
b737c0f5db [1.10.x] Fixed #25044 -- Fixed migrations for renaming ManyToManyField's through model.
Backport of f1e408ff40d2c1753f92515c70a44634b4d47467 from master
2016-05-30 10:27:28 -04:00
Simon Charette
dfae72f45a [1.10.x] Fixed #26647 -- Included the state of all applied migrations when migrating forward.
Thanks Jasper Maes for the detailed report.

Backport of 36d36818a30025034cad6f1ee59b2a960a6582ec from master
2016-05-26 13:32:02 -04:00
Alex Hill
2ff7ef15b0 Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests 2016-05-19 21:33:36 -04:00
Loïc Bistuer
3a47d42fa3 Fixed #20932, #25897 -- Streamlined manager inheritance. 2016-05-17 02:29:22 +07:00
Simon Charette
c0118ff80b Refs #24201 -- Ignored order_with_respect_to private fields in migrations.
Thanks Tim for the review.
2016-05-13 15:43:23 -04:00
Raphael Gaschignard
8f6a1a1551 Fixed #26429 -- Added a timestamp to merge migration names.
This reduces the possibility of a naming conflict, especially after
squashing migrations.
2016-05-11 08:19:19 -04:00
Iacopo Spalletti
49c57f8565 Fixed #25005 -- Made date and time fields with auto_now/auto_now_add use effective default.
Thanks to Andriy Sokolovskiy for initial patch.
2016-05-09 07:48:40 -04:00
Jarek Glowacki
80bf3135d0 Sorted migration list order in test; added trailing comma. 2016-05-08 13:53:36 +02:00
Jarek Glowacki
c8df17b612 Included reverse deps in showmigrations 2016-05-08 13:53:36 +02:00
Jarek Glowacki
509379a161 Fixed #25945, #26292 -- Refactored MigrationLoader.build_graph() 2016-05-08 13:53:26 +02:00
Markus Holtermann
3b383085fb Fixed #26555 -- Gave deconstructible objects a higher priority during serialization 2016-05-04 22:39:19 +02:00
Simon Charette
f951bb78cb Refs #26521 -- Adjusted CreateModel bases validation to account for mixins.
Thanks Collin for the report.
2016-04-28 18:20:48 -04:00
Simon Charette
a877a2f83d Refs #26521 -- Added the duplicated value to CreateModel validation messages.
Thanks Tim for the suggestion.
2016-04-27 16:17:22 -04:00
James Robert
417e083e55 Fixed #26521 -- Validated CreateModel bases, fields and managers for duplicates. 2016-04-27 12:43:56 -04:00
Tim Graham
6729b96d8a Removed try/fail antipattern from migrations commands tests. 2016-04-27 10:21:18 -04:00
Tim Graham
87338198e9 Fixed #26320 -- Deprecated implicit OneToOnField parent_link. 2016-04-22 12:59:41 -04:00
Matthew Schinckel
5402f3ab09 Fixed #26475 -- Added functools.partial() support to migrations autodetector. 2016-04-19 10:17:11 -04:00
Berker Peksag
93deb1691e Fixed #26492 -- Fixed "maximum recursion depth exceeded" migrate error.
A regression introduced in 0d3c616fbb2f49fa7ff6809e5a6777275352b35b;
refs #26351.
2016-04-12 09:04:14 -04:00
Tim Graham
92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Attila Tovt
02ae5fd31a Fixed #25850 -- Made migrate/makemigrations error on inconsistent history. 2016-04-05 08:52:08 -04:00
Markus Holtermann
8b1110ddff Added missing primary keys to some OperationTests
Thanks Common Code for financing the work on this commit.
2016-04-03 01:40:46 +02:00
Attila Tovt
00dbd02f7e Made MakeMigrationsTests call proper parent method 2016-04-02 10:10:38 +02:00
Berker Peksag
14e6823d09 Refs #25388 -- Used in-memory database in test_disable_migrations. 2016-03-23 10:55:30 -04:00
Berker Peksag
157d7f1f1d Fixed #25388 -- Added an option to allow disabling of migrations during test database creation 2016-03-23 08:21:30 +08:00
Jarek Glowacki
34c56687ae Fixed #26342 -- Prevented unpacking when repr a NodeNotFoundError 2016-03-10 17:27:35 +11:00
Scott Sexton
fc584f0685 Fixed #26117 -- Consulted database routers in initial migration detection.
Thanks Simon Charette for help.
2016-02-25 09:56:00 -05:00
Tim Graham
8ad7b8118c Used addCleanup() to call recorder.flush() in migration loader tests. 2016-02-24 11:22:09 -05:00
Tim Graham
406675b1a0 Fixed #26176 -- Fixed E123 flake8 warnings. 2016-02-05 15:11:07 -05:00
Pankrat
f91a04621e Fixed #25833 -- Added support for non-atomic migrations.
Added the Migration.atomic attribute which can be set to False
for non-atomic migrations.
2016-02-05 09:09:05 -05:00
Hasan
26ad01719d Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate. 2016-01-29 13:37:33 -05:00
Hasan
3d0dcd7f5a Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
Yoong Kang Lim
5453aa66cf Added a missing test method in tests/migrations/test_writer.py. 2016-01-28 10:38:10 -05:00
Simon Charette
4dcaa5871b Fixed #26135 -- Adjusted the migration questioner's handling of disabled apps.
This was causing an issue when calling the `migrate` command in a test case with
the `available_apps` attribute pointing to an application with migrations
disabled using the `MIGRATION_MODULES` setting.

Thanks to Tim Graham for the review.

Refs #24919
2016-01-25 21:38:36 -05: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
Alexander Sosnovskiy
2a7ce34600 Fixed #14286 -- Added models.BigAutoField. 2015-12-25 20:01:31 -05:00
Tim Graham
fa9ce4e9a6 Fixed #25922 -- Fixed migrate --fake-initial detection of many-to-many tables. 2015-12-19 13:37:24 -05:00
Niels Van Och
99a1265a39 Fixed #25063 -- Added path to makemigration's output of migration file. 2015-12-18 11:20:00 -05:00
Simon Charette
c4e372aaf4 Fixed #25852 -- Made sure AlterModelManager forces a reload of its model state.
Thanks to Geoffrey Sechter and the Django NYC group for the report and Markus
for the review.
2015-12-15 12:22:59 -05:00
Shai Berger
c8b3fbe21b Refs #25896 -- Fixed migration test failure on Oracle
The test creates and deletes a model in the same migration, and the model
had an AutoField. On Oracle, AutoField's are set up using deferred SQL, which
in this case was trying to modify a table after it had dbeen removed.
2015-12-10 02:12:04 +02:00
Amos Onn
542b7f6c50 Fixed #25896 -- Fixed state bug in SeparateDatabaseAndState.database_backwards(). 2015-12-09 11:06:57 -05:00
Josh Soref
93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Simon Charette
cc2ca9c550 Fixed #25807 -- Instructed the migration writer about lazy objects.
Thanks to Trac alias mrgaolei for the report, Baptiste for the confirmation
and Tim for the review.
2015-11-26 11:14:47 -05:00
Ana Vojnovic
73a6ab6382 Fixed #25551 -- Fixed migration operations ordering when adding fields and a unique_together constraint. 2015-11-20 12:20:41 -05:00
Andrei Fokau
998894e1b9 Fixed #25764 -- Added support for serialization of enum.Enum in migrations.
Thanks Tim Graham for the review.
2015-11-19 17:21:12 -05:00
Simon Charette
1c5f4e86bc Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite. 2015-11-14 11:33:28 -05:00