Make the handling of null-issues on backward-transactions more friendly
by generating the code for the field change together with the code
that raises the exception when user chooses that option.
The migration still needs to be edited, but more of the code that should
end in it is already there.
This is a fix I suggested very long ago on the mailing list, finally got around to it.
(note that there is only one commit that really belongs here, the other two commits are from my earlier, less controversial PR).