tags -1 moreinfo thanks Searching the web for ‘Specified key was too long; max key length is 767 bytes’ produces various solutions and work-arounds. It seems to be a popular question for MySQL database flavours.
I cannot reproduce this problem today on Debian bullseye. Tagging as moreinfo and intend to close it later.