#26292: Refactor MigrationLoader.build_graph() to use more of MigrationGraph's
features
--------------------------------------+------------------------------------
Reporter: MarkusH | Owner: jarekwg
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by jarekwg):
While working on this, I started toying around with the idea of building
the migration graph in a more complex way where it's aware of applied/non-
applied and replacing/non-replacing migrations. Something along the lines
of a directional graph with coloured nodes (denoting applied/non-applied)
and coloured edges (denoting dependency/replaces).
This would still spawn dummy nodes as it builds the graph, but once
finished, an extra function could then be run over the graph - something
like `simplify` or `resolve` - where the graph would resolve all the
replacing migrations internally, simplifying itself back down to the form
it has currently.
It's not the path I'm taking currently, as I'm trying to avoid giving the
graph too much knowledge of stuff that's only needed for its
initialisation. Seems to belong more to the loader. But just thought I'd
leave this idea here as food for thought.
--
Ticket URL: <https://code.djangoproject.com/ticket/26292#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.9ca721b27312df4935b3c0b955b1b244%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.