There’s no easy way to do this right now but it should be possible with some database manipulation. We recommend against modifying the database directly since it can have unintentional side effects that break your system. That said, I can point you in the right direction and I strongly recommend backing up your database before making any manual changes to it.
So I haven’t tried this myself, but in theory you should be able to:
SELECT Id FROM Channels WHERE Name = 'channel-to-keep'; - save this Id and I’ll refer to it as finalId
SELECT Id FROM Channels WHERE Name = 'channel-to-be-merged'; - save this Id and I’ll refer to it as oldId
UPDATE Posts SET ChannelId = 'finalId' WHERE ChannelId = 'oldId'; - this will move all the posts over
DELETE FROM ChannelMembers WHERE ChannelId = 'oldId'; - this will remove any old channel member objects for the old channel and users from the old channel will need to manually join the final channel if they weren’t already in it
DELETE FROM Channels WHERE ChannelId = 'oldId'; - this will remove the old channel
You will also need to update or delete the old channel Id in additional tables if you have IncomingWebhooks, OutgoingWebhooks, or Commands on that channel.
Note those queries are given in MySQL syntax and might be slightly different for PostgreSQL.