Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/migrations
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25604 -- Added makemigrations --check option.Jon Dufresne2015-10-241-1/+15
| | | | Command exits with non-zero status if changes without migrations exist.
* Refs #18012 -- Accounted for reverse proxy relations in ↵Simon Charette2015-10-201-0/+10
| | | | | | migrations. Thanks to Markus for the suggestion and Tim for the review.
* Refs #23359 -- Removed the migrate --list option per ↵Tim Graham2015-09-241-33/+1
| | | | deprecation timeline.
* Fixed #25390 -- Allowed specifying a start migration in ↵Markus Holtermann2015-09-191-0/+31
| | | | | | squashmigrations Thanks Tim Graham for the review.
* Fixed #24743, #24745 -- Optimized migration plan handlingMarkus Holtermann2015-09-191-0/+59
| | | | | | | | | | | | | | | | The change partly goes back to the old behavior for forwards migrations which should reduce the amount of memory consumption (#24745). However, by the way the current state computation is done (there is no `state_backwards` on a migration class) this change cannot be applied to backwards migrations. Hence rolling back migrations still requires the precomputation and storage of the intermediate migration states. This improvement also implies that Django does not handle mixed migration plans anymore. Mixed plans consist of a list of migrations where some are being applied and others are being unapplied. Thanks Andrew Godwin, Josh Smeaton and Tim Graham for the review as well as everybody involved on the ticket that kept me looking into the issue.
* Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić2015-09-127-18/+60
|
* Refs #24919 -- Raised more helpful error message for ↵Markus Holtermann2015-09-121-0/+13
| | | | disabled migrations
* Fixed #24919 -- Allowed disabling of migrations on a per ↵Markus Holtermann2015-09-121-0/+23
| | | | app basis
* Refs #24215 -- Improved error message for unhandled lazy ↵Alex Hill2015-09-081-4/+34
| | | | model operations.
* Fixed #25259 -- Added comments to header of generated ↵Tyson Clugg2015-08-311-1/+23
| | | | migration files
* Refs #24590 -- Ensured isolation between autodetector testsMarkus Holtermann2015-08-281-51/+65
| | | | Fixed a regression introduced in e1427cc609fa6ab247501b101cfb3c0092aba55b when running tests in reverse order.
* Fixed #25280 -- Properly checked regex objects for ↵Markus Holtermann2015-08-271-0/+43
| | | | | | | equality to prevent infinite migrations Thanks Sayid Munawar and Tim Graham for the report, investigation and review.
* Fixed #25308 -- Made MigrationQuestioner respect ↵Jeremy Satterfield2015-08-261-0/+10
| | | | MIGRATION_MODULES setting.
* Fixed typo in tests/migrations/test_autodetector.py.Tim Graham2015-08-201-6/+6
|
* Fixed #24755 -- Hid operations from dependency apps when ↵Markus Holtermann2015-08-186-0/+104
| | | | | | merging migrations Thanks Carl Meyer for the report and Tim Graham for the review.
* Fixed #25239 -- Corrected makemigrations numbering if a ↵Caio Ariede2015-08-143-0/+25
| | | | migration has a number-only filename.
* Used skipUnlessDBFeature where appropriate.Simon Charette2015-08-081-2/+2
|
* Fixed #25231 -- Added recording of squashed migrations ↵mlavin2015-08-071-0/+46
| | | | | | | | in the migrate command. Ensured squashed migrations are recorded as applied when the migrate command is run and all of the original migrations have been previously applied.
* Fixed #25185 -- Added support for functools.partial ↵Piper Merriam2015-07-291-0/+8
| | | | serialization in migrations
* Fixed #25186 -- Improved migration's serialization of ↵Piper Merriam2015-07-291-0/+5
| | | | builtins on Python 2.
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-2824-96/+119
| | | | on_delete for ForeignKey/OneToOneField
* Fixed #24375 -- Added Migration.initial attributeAndrei Kulakov2015-07-138-0/+147
| | | | | | | The new attribute is checked when the `migrate --fake-initial` option is used. initial will be set to True for all initial migrations (this is particularly useful when initial migrations are split) as well as for squashed migrations.
* Fixed #25040 -- Fixed migrations state crash with ↵Kai Richard Koenig2015-07-021-0/+7
| | | | GenericForeignKey
* Refs #20203 -- Allowed adding custom default manager to ↵Andriy Sokolovskiy2015-06-301-0/+20
| | | | | | | | | the model state If the only manager on the model is the default manager defined by Django (`objects = models.Manager()`), this manager will not be added to the model state. If it is custom, it needs to be passed to the model state.
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-241-2/+2
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Used mock in MigrationQuestioner testsMarkus Holtermann2015-06-231-44/+28
| | | | Thanks Andriy Sokolovskiy and Simon Charette for the review.
* Removed support for Python 3.3.Tim Graham2015-06-181-1/+1
|
* Fixed #24828 -- Allowed migration optimization across ↵Markus Holtermann2015-06-163-4/+157
| | | | | | | | | | | | | | | | 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 128caa1e16ec2627737748f75c8e55600a3df97f, these operations are optimized in a later round of the optimizer. Thanks Tim Graham for the review.
* Optimized duplicate ↵Markus Holtermann2015-06-141-0/+39
| | | | | | AlterModelTable/AlterFooTogether/AlterOWRT Thanks Andrew Godwin for the review.
* Took AlterOrderWithRespectTo into account when ↵Markus Holtermann2015-06-141-3/+13
| | | | | | optimizing migrations Thanks Andrew Godwin for the review.
* Cleaned up docstring style, per Tim Graham review.Carl Meyer2015-06-041-7/+2
|
* Refs #24628 -- Added a second test and a docstring ↵Carl Meyer2015-06-031-0/+24
| | | | comment to avoid regression.
* Fixed #24628 -- Fixed applied status for squashed ↵Carl Meyer2015-06-031-0/+26
| | | | migrations.
* Improved isolation of applied-migrations table in ↵Carl Meyer2015-06-031-0/+6
| | | | migration tests.
* Fixed #24895 -- Fixed loading a pair of squashed ↵Carl Meyer2015-06-021-2/+27
| | | | migrations with a dependency.
* Fixed #24883 -- Added MigrationGraph.__repr__()Yoong Kang Lim2015-06-011-0/+1
|
* Fixed #24340 -- Added nested deconstruction for list, ↵Matt Westcott2015-05-261-1/+208
| | | | | | | tuple and dict values Nested deconstruction should recursively deconstruct items within list, tuple and dict values.
* Fixed #24848 -- Fixed ValueError for faulty migrations ↵Marten Kenbeek2015-05-251-2/+10
| | | | | | | | | module. Added apps to unmigrated apps if the migrations module is a file or a folder missing __init__.py. Thanks to Ernest0x for the bug report.
* Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette2015-05-204-9/+9
|
* Fixed #24812 -- Fixed app registry RuntimeWarnings in ↵Tim Graham2015-05-181-0/+9
| | | | schema and migrations tests.
* Moved migration exception classes to shared moduleMarkus Holtermann2015-05-023-6/+7
| | | | Thanks Aymeric Augustin for the review.
* Fixed #24725 -- Allowed renaming of target models in ↵Markus Holtermann2015-04-301-0/+26
| | | | | | | | | | ManyToMany relations This is a regression caused by introducing rendered migration states in 1aa3e09c2043 and the _meta refactoring in fb48eb05816b. Thanks to Danilo Bargen for reporting the issue and Marten Kenbeek and Tim Graham for triaging the bug and providing the initial test case.
* Fixed #24701 -- Converted model manager names to unicode ↵Markus Holtermann2015-04-251-1/+6
| | | | | | | in migrations Thanks to Reto Aebersold for reporting the issue and Tim Graham and Claude Paroz for the review.
* Fixed #24573 -- Considered new related models for reloadingMarkus Holtermann2015-04-211-1/+52
| | | | Thanks tttomekkk for the report.
* Fixed #24591 -- Optimized cloning of ModelState objects.Marten Kenbeek2015-04-211-0/+16
| | | | | Changed ModelState.clone() to create a shallow copy of self.fields and self.managers.
* Refs #24397 -- Sped up model reloading in ProjectState.Marten Kenbeek2015-04-201-0/+16
| | | | | Created bulk_update() context manager on StateApps. Sped up unregistering models in reload_models() by using this context mananger.
* Fixed #24595 -- Prevented loss of null info in MySQL ↵Claude Paroz2015-04-171-2/+11
| | | | | | | field alteration Thanks Simon Percivall for the report, and Simon Charette and Tim Graham for the reviews.
* Fixed #24514 -- Made migration writer omit models import ↵Christopher Luc2015-04-101-0/+16
| | | | if it's unused.
* Use mock.patch in migrations testsCurtis Maloney2015-04-091-51/+38
| | | | | | | | | Currently some of the migrations tests rely on the fact 'input' is aliased because of six, instead of using mock.patch. Replace this code with proper use of mock.patch. Also, replace one case of excessively specific python version check with testing six.PY3
* Fixed #24513 -- Made sure a model is only rendered once ↵Patryk Zawadzki2015-04-071-1/+52
| | | | | | | | | during reloads This also prevents state modifications from corrupting previous states. Previously, when a model defining a relation was unregistered first, clearing the cache would cause its related models' _meta to be cleared and would result in the old models losing track of their relations.