Add an error and optional checking for missing signatures.
Review Request #10320 — Created Nov. 14, 2018 and submitted
In previous versions of Django Evolution, running
evolve --execute
without first runningsyncdb
could result in crashes with large stack
traces due to missing baseline signatures. While this was all happening
in the simulation stage, it was scary, and not obvious as to what's
going on.Now, the various signature getter functions can be told that a result is
required. If required and a signature is not present, a
MissingSignatureError
will be raised, which will be shown to the user
in a more clear, less-scary way. This is also now raised when removing
signatures, instead of using the more genericValueError
.Not many places make use of the new
required
argument yet. This will
be used more in future changes.
Unit tests pass.
Tested a situation with evolutions made to models not yet in the baseline.
Saw the cleaner error.