For now, you can implement something in the database by creating a trigger that checks the automatically generated identifier, and if this identifier is included in your exclusion list, delete the line and try again.
But it seems hacked to me ... and makes the database take care of things that should be outside of it - identifiers that translate into dirty words.
Instead, I propose a solution completely outside the database. For example, can you change your own alphabet to exclude all vowels? Thus, regardless of the identifier generated, it will never say anything wrong in your URL.
I could come up with a lot of words that you do not need in your url. If you try to blacklist unwanted words, I would say that the chances are pretty good that a more exotic term will slip through ... so I think an approach that does not require a blacklist would be ideal for that reason.
source share