I solved part with deletion. For this I deleted all tickets. Do not know, is this was the only way to do this.
Ticket.destroy_all
Ticket::Priority.find_by(name: ‘XYZ’).destroy
Rename priority name:
p = Ticket::Priority.find_by(name: “2 normal”)
p.name = “2 medium”
p.save!