I have a table with a primary key that is a varchar(255). Some cases have arisen where 255 characters isn\'t enough. I tried changing the field to a text, but I get the foll
alter table authors ADD UNIQUE(name_first(767), name_second(767));
NOTE : 767 is the number of characters limit upto which MySQL will index columns while dealing with blob/text indexes
Ref : http://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html