create new doi within a trasaction

I forgot to push this out as part of another pull request.

https://github.com/Tahi-project/tahi/pull/629