Delete added ticket priority and rename Normal to Medium

Zammad 6.2, package, Ubuntu.
I created new priority with command:
Ticket::Priority.create(name: ‘4 critical’, default_create: false, note: nil, active: true, updated_by_id: 1, created_by_id: 1, created_at: Time.now, updated_at: Time.now)

How can i delete it? And How to change name of Normal priority to Medium.
Thanks.

I solved part with deletion. For this I deleted all tickets. Do not know, is this was the only way to do this.

Dangerzone

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!

I have been forced to hide your destroyal part. This is a potential dangerous operation and may break existing data or even remove tickets by accident. Priorities should be set to inactive if they’re no longer needed, not destroyed. The same applies to ticket states.