summaryrefslogtreecommitdiff
path: root/tests/field_deconstruction
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-02-06Fixed #36061 -- Added migration support for ManyToManyField.through_fields.brian
Added through_fields support to ManyToManyField.deconstruct. Thanks to Simon Charette for pointers and the review.
2023-08-30 Fixed #31262 -- Added support for mappings on model fields and ↵Nick Pope
ChoiceField's choices.
2023-08-22Added tests for model field's choices iterator/iterable values.Natalia
2022-02-16Fixed #33515 -- Prevented recreation of migration for ManyToManyField to ↵Mariusz Felisiak
lowercased swappable setting. Thanks Chris Lee for the report. Regression in 43289707809c814a70f0db38ca4f82f35f43dbfd. Refs #23916.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-12-17Fixed #33366 -- Fixed case handling with swappable setting detection in ↵Simon Charette
migrations autodetector. The migration framework uniquely identifies models by case insensitive labels composed of their app label and model names and so does the app registry in most of its methods (e.g. AppConfig.get_model) but it wasn't the case for get_swappable_settings_name() until this change. This likely slipped under the radar for so long and only regressed in b9df2b74b98b4d63933e8061d3cfc1f6f39eb747 because prior to the changes related to the usage of model states instead of rendered models in the auto-detector the exact value settings value was never going through a case folding hoop. Thanks Andrew Chen Wang for the report and Keryn Knight for the investigation.
2021-08-06Refs #32983 -- Removed unneeded related_name from test model definitions.Nick Touran
2021-05-28Fixed #32676 -- Prevented migrations from rendering related field attributes ↵David Wobrock
when not passed during initialization. Thanks Simon Charette for the implementation idea.
2021-01-14Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.Mariusz Felisiak
2020-03-25Fixed #23916 -- Allowed makemigrations to handle related model name case ↵Adam Johnson
changes. Made autodetector ignore related model name case changes so unnecessary migrations are not created.
2019-11-19Fixed #30987 -- Added models.PositiveBigIntegerField.Caio Ariede
2017-12-22Fixed #28937 -- Allowed BinaryField to be editable=True.Cameron Curry
2017-09-11Tested field deconstruction with DEFAULT_DB_TABLESPACE and db_tablespace.Simon Charette
2017-06-14Added additional field_construction tests for related fields.Adam Bogdał
2017-06-14Fixed #24195 -- Deconstructed the limit_choices_to option of related fields.Adam Bogdał
Migrations will now be created for changes to limit_choices_to.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-09-17Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.Tim Graham
http://bugs.python.org/issue27364
2015-08-28Refs #24590 -- Ensured isolation between autodetector testsMarkus Holtermann
Fixed a regression introduced in e1427cc609fa6ab247501b101cfb3c0092aba55b when running tests in reverse order.
2015-08-27Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann
Moved the lookup in Field.swappable_setting to Apps, and added an lru_cache to cache the results. Refs #24743 Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric Augustin and Tim Graham for the review.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
2015-03-18Refs #24483 -- Added a test for deconstruction of Field.choicesTim Graham
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-12-12Revert "Fixed #23455 -- Forced related_name to be a unicode string during ↵Carl Meyer
deconstruction." This reverts commit 45bd7b3bd9008941580c100b9fc7361e3ff3ff0d.
2014-09-25Fixed #23455 -- Forced related_name to be a unicode string during ↵Markus Holtermann
deconstruction.
2014-08-14Fixed #23288: deconstruct() ignoring related_nameAndrew Godwin
2014-08-03Added missing logic to TimeField.deconstruct().Baptiste Mispelon
If auto_now or auto_now_add was used then the serialized field in the migration contained unnecessary `editable` and `blank` arguments.
2014-08-03Fixed #23156 -- Added missing BinaryField.deconstruct() method.Baptiste Mispelon
2014-07-26Fixed #23101 db_table wasn't copied in deconstructAbraham Martin
Forward port of 999758fc7a2d6fcb01eb40de937d4420f884788d from stable/1.7.x
2014-07-04Fixed #20631 -- Increased the default EmailField max_length to 254.Tim Graham
Thanks pmartin for the report.
2014-06-23Fixed #22889: Unneeded to_field in fk.deconstruct causing swap issuesAndrew Godwin
2014-05-08Appeased flake8.Aymeric Augustin
2014-05-06Fixed #22337: FileSystemStorage marked as deconstructible and tested.Andrew Godwin
2014-05-06Fixed #22564 -- Prevented unneeded bytestrings in migrationsClaude Paroz
In some cases, this could lead to migrations written with Python 2 being incompatible with Python 3. Thanks Tim Graham for the report and Loïc Bistuer for the advices.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-03-14Fixed #22272 -- Fixed regression in DecimalField when using decimal_places=0.Baptiste Mispelon
Thanks to trac user merb for the report.
2014-03-084 flake8 warning fixesAlex Gaynor
2014-03-08Fixed #22183: Through M2Ms now correctly handledAndrew Godwin
2014-03-08Fixed #22199: Bad max_length deconstruction for FileFieldAndrew Godwin
2014-01-19Implement swappable model support for migrationsAndrew Godwin
2014-01-17Fixed #21785: Bad handling of both auto_now and _add on deconstructAndrew Godwin
2013-12-17Removed superfluous models.py files.Aymeric Augustin
Added comments in the three empty models.py files that are still needed. Adjusted the test runner to add applications corresponding to test labels to INSTALLED_APPS even when they don't have a models module.
2013-10-19Removed unused local variables in tests.Tim Graham
2013-09-28Fixed #20439 -- Started deprecation of IPAddressFieldErik Romijn
2013-06-28Ported over Field.deconstruct() from my schema alteration branch.Andrew Godwin
This is to help other ongoing branches which would benefit from this functionality.