Thank you for tip, there was error before this. I really should stop updating servers after midnight my resources are low in that time.
Anyway for future readers:
Error was produced because somehow we had in table tags multiple rows with same value in column name.
After deleting tags with duplicated rows upgrade went smoothly.