My first impression here, is that the upgrade should not belong to the worker.
A migration should belong to database code. This way we avoid polluting the worker.

I have no better proposition though. I think we should start a bigger discussion about migrations.
What @n1k0 thinks about this?