FIX: Ensure chat channel slug uniqueness at DB level (#19277)

There must have been a small loophole that allowed
setting the channel slug in the DB which has led to
conflicts in some cases.

This commit fixes the conflicting chat channel
slugs and then changes the channel slug index
to a unique one in the DB.
This commit is contained in:
Martin Brennan
2022-12-02 11:15:43 +10:00
committed by GitHub
parent f0c8bc9e4d
commit 7212a2ad51
5 changed files with 93 additions and 7 deletions

View File

@ -144,6 +144,6 @@ end
#
# index_chat_channels_on_chatable_id (chatable_id)
# index_chat_channels_on_chatable_id_and_chatable_type (chatable_id,chatable_type)
# index_chat_channels_on_slug (slug)
# index_chat_channels_on_slug (slug) UNIQUE
# index_chat_channels_on_status (status)
#