When I executed the following command:
create table assessment (
id integer not null auto_increment unique,
assignment_weight_type tinyint not null,
description varchar(255),
end_date datetime not null,
from_grade tinyint not null,
f_id tinyint not null,
name varchar(255) not null,
start_date datetime not null,
status tinyint not null,
weight smallint,
school_id integer not null,
school_year_id integer not null,
s_id integer, primary key (id),
unique (name, school_id, school_year_id, from_grade, f_id)
) ENGINE=InnoDB;
I got this error message:
Specified key was too long; max key length is 767 bytes
I am using a charset of utf8mb4. So why did I get the error message?