Alright, I managed to solve the issue (at least, I think so).
For me it was kind of a hassle to figure this all out so I’ll share the full steps.
cd /var/discourse && ./launcher enter app
rails c
DB.exec("UPDATE chat_channels SET slug = 'new' WHERE slug = 'old';")
So in your rails console this will look like this:
[1] pry(main)> DB.exec("UPDATE chat_channels SET slug = 'new' WHERE slug = 'old';")
=> 1
[2] pry(main)> exit
root@discourse-app:~# exit
logout
➜ discourse git:(main) ✗
I am now able to create a new channel with the wanted slug.
Is this the (or a) right way?