Change chat channel linked category in Rails console?

Dear Discourse community,

it is not possible in the UI to change the category which is linked to a chat channel. I need to move a chat to a different category.

I am wondering if this is possible through the Rails console or would it break something?

Any hints on how to go about it and experiences are welcome.