Specified key was too long creating primary key
767 Limit in InnoDB Indexes lists 5 work arounds for the 767 problem.
But, these days, the preferred solution is to upgrade:
This problem exists before the limit was raised in 5.7.7 (MariaDB 10.2.2?).