Move code to a script to be possible reuse it
Refactor code to be possible run all constraints with constraint type equal upgrader in the same transaction