Comment (by Yury V. Zaytsev):
Thank you for your thoughts, Simon!
> I'm curious of where you experience the flip-flop though. Are you
generating the same migrations over and over again?
Yes, your assessment is correct. We are only having these problems in the
projects, in which we are using Django as a static site or configuration
generator. In these projects we basically have the databases in YAML
fixtures with changes workflow controlled by GitHub pull requests.
If we change the code of the generator itself (and specifically Django
models), then we re-create the migrations completely, because keeping
migration history just doesn't make sense. There is no "real" database to
migrate in the first place, they just bloat the repository and slow the
generators down... It's working quite nicely and the diffs are very
readable, if it weren't for annoying flip-flop hunks, which one always has
to remember to discard from the checkout before committing the changes.
I guess not many people use Django like this, but it seems that we are not
completely alone, and by the way... did I already mention that Django is
awesome?
> I think this is something that should be considered in another ticket
but that we could ultimately do. The fact they are currently stored in a
list today provides a false sense that their ordering is meaningful while
it's not actually the case.
I've had a look at the code after I voiced the idea, and I agree with you,
that if this is to be done, then better in a different ticket.
Unfortunately, this part of the class is templated in a different fashion
than all the rest, and just turning dependencies into a set and hoping
that my new serializer with take care of that won't fly. It seems that
it's actually quite some work to do it properly... but I agree, that
generally it's desirable, because I like your point of having the types to
convey the semantic.
If there is anything else I can do that would be helpful to you according
to Django process to get this in, please feel free to ping me.
--
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Yury V. Zaytsev):
[https://github.com/django/django/pull/17066 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:6>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:7>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:8>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"02966a30dd31d2b9d35f8c481a448b9bf377895e" 02966a3]:
{{{
#!CommitTicketReference repository=""
revision="02966a30dd31d2b9d35f8c481a448b9bf377895e"
Fixed #34697 -- Fixed non-deterministic order of dependencies and
sets/frozensets in migrations.
Co-authored-by: Dakota Hawkins <dakota...@gmail.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:9>