summaryrefslogtreecommitdiff
path: root/django/db/migrations
AgeCommit message (Collapse)Author
2020-04-20Fixed #24559 -- Made MigrationLoader.load_disk() catch more specific ↵Jon Dufresne
ModuleNotFoundError. Avoids inspecting the exception message, which is not considered a stable API and can change across Python versions. ModuleNotFoundError was introduced in Python 3.6. It is a subclass of ImportError that is raised when the imported module does not exist. It is not raised for other errors that can occur during an import. This exception instance has the property "name" which holds the name of module that failed to import.
2020-04-10Refs #28305 -- Consolidated field referencing detection in migrations.Simon Charette
This moves all the field referencing resolution methods to shared functions instead of duplicating efforts amongst state_forwards and references methods.
2020-04-09Replaced ModelTuple by a model resolving function and bare tuples.Simon Charette
ModelTuple made handling of app_label=None easier but it isn't necessary anymore.
2020-04-09Replaced Operation._get_model_tuple() by ModelTuple.from_model().Simon Charette
This method predated the introduction of ModelTuple and had a single use.
2020-04-09Made Operation.references_model/references_field require app_label.Simon Charette
This will allow them to drop a ton of logic to deal with null app_label.
2020-04-09Refs #22608 -- Made app_label required when optimizing migrations.Simon Charette
This paved the way for the removal of lot of logic when app_label was not specified.
2020-04-07Refs #29000 -- Restored delayed model rendering of RenameField.Simon Charette
Non-delayed rendering is unnecessary and wasteful now that state models relationship consistency on delayed reload is ensured. This partly reverts commit fcc4e251dbc917118f73d7187ee2f4cbf3883f36.
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.
2020-03-09Fixed #31318 -- Allowed sqlmigrate to inspect squashed migrations.David Wobrock
2020-03-09Refs #31318 -- Moved MigrationExecutor.collect_sql() to MigrationLoader.David Wobrock
collect_sql() is used only in sqlmigrate.
2020-03-02Refs #26064 -- Avoided unnecessary list slicing in migration optimizer.Simon Charette
The in_between list is only necessary if an optimization is possible.
2020-02-06Fixed #31233 -- Closed database connections and cursors after use.Jon Dufresne
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2020-01-20Changed re-raising an exception to use bare raise syntax where appropriate.Jon Dufresne
2019-11-25Fixed #27914 -- Fixed serialization of nested classes in migrations.John Bowen
2019-11-15Fixed #29808 -- Fixed initial migration detection when identifiers are ↵Hasan Ramezani
case-insensitive. Thanks Simon Charette for the review.
2019-11-15Refs #29808 -- Optimized MigrationExecutor.detect_soft_applied().Hasan Ramezani
Use set() for iterables used only for containment checks. Simplify column checks O(n) instead of O(2n). Thanks Simon Charette for an idea.
2019-10-21Fixed #30876 -- Moved classproperty() decorator to the django.utils.functional.André Ericson
2019-10-14Fixed #30868 -- Prevented unnecessary AlterField when renaming a referenced pk.Simon Charette
Regression introduced by dcdd219ee1, refs #25817. Thanks Carlos E. C. Leite for the report and Mariusz for the bisect.
2019-10-10Fixed #30300 -- Allowed migrations to be loaded from directories without ↵Benjy Weinberger
__init__.py file.
2019-10-03Refs #27914 -- Fixed serialization of nested enum.Enum classes in migrations.Hasan Ramezani
2019-09-30Fixed #30774 -- Made serialization in migrations use members names for Enums.Hasan Ramezani
2019-09-04Fixed #27910 -- Added enumeration helpers for use in Field.choices.Shai Berger
These classes can serve as a base class for user enums, supporting translatable human-readable names, or names automatically inferred from the enum member name. Additional properties make it easy to access the list of names, values and display labels. Thanks to the following for ideas and reviews: Carlton Gibson, Fran Hrženjak, Ian Foote, Mariusz Felisiak, Shai Berger. Co-authored-by: Shai Berger <shai@platonix.com> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-09-03Fixed #30691 -- Made migrations autodetector find dependencies for foreign ↵Viktor Lomakin
keys altering.
2019-08-02Simplified AlterModelTable by making it subclass ModelOptionOperation.Nick Pope
2019-04-18Fixed typos in docs, comments, and exception messages.Ville Skyttä
2019-04-14Fixed #30350 -- Prevented recreation of migration for operations with a ↵Florian Apolloner
range object. Thanks to Mariusz Felisiak for helping with the patch.
2019-03-07Refs #30186 -- Changed MigrationRecorder.applied_migrations() to return a dict.Tim Schilling
2019-02-25Refs #30179 -- Moved topological sort functions to django.utils.Matthias Kestenholz
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2019-01-31Fixed #30147 -- Simplified directory creation with os.makedirs(..., ↵Jon Dufresne
exist_ok=True).
2019-01-22Fixed #30111 -- Fixed AppRegistryNotReady error with django.contrib.postgres ↵Nasir Hussain
in INSTALLED_APPS. Regression in e192223ed996ed30fe83787efdfa7f2be6b1a2ee.
2019-01-13Fixed #27685 -- Added watchman support to the autoreloader.Tom Forbes
Removed support for pyinotify (refs #9722).
2019-01-11Refs #29738 -- Allowed registering serializers with MigrationWriter.can
2019-01-11Moved django.db.migrations.writer.SettingsReference to django.conf.Tim Graham
Reduces the possibility of circular imports.
2018-12-19Fixed #30031 -- Added --no-header option to makemigrations/squashmigrations.Dakota Hawkins
2018-11-30Fixed #29987 -- Detected unmanaged model deletions.Tim Fiedler
2018-10-29Fixed #29897 -- Fixed autodetector's swappable MTI dependency resolution.Simon Charette
Thanks Steven Ganz for the detailed report.
2018-10-29Refs #29897 -- Moved autodetector swappable dependency resolution to a method.Simon Charette
2018-10-29Refs #23322 -- Removed unnecessary "and" clause in the autodetector.Simon Charette
If the depedency was swappable then it'll be resolved at this point.
2018-10-29Fixed #29868 -- Retained database constraints on SQLite table rebuilds.Simon Charette
Refs #11964. Thanks Scott Stevens for testing this upcoming feature and the report.
2018-10-24Fixed #29721 -- Ensured migrations are applied and recorded atomically.Sanyam Khurana
2018-10-11Fixed #29814 -- Added support for NoneType serialization in migrations.Patrik Sletmo
2018-10-09Capitalized "Python" in docs and comments.Jon Dufresne
2018-09-28Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev
2018-09-26Refs #29784 -- Switched to https:// links where available.Jon Dufresne
2018-09-14Fixed #29755 -- Made migrations detect changes to Meta.default_related_name.Simon Charette
2018-09-11Fixed #29749 -- Made the migrations loader ignore files starting with a ↵Tim Graham
tilde or underscore. Regression in 29150d5da880ac1db15e47052330790cf1b802d2.
2018-09-10Fixed #29243 -- Improved efficiency of migration graph algorithm.Krzysztof Gogolewski
2018-08-01Fixed typos in comments and docs.luz.paz