当我执行以下命令时:
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;
我收到此错误消息:
Specified key was too long; max key length is 767 bytes
我正在使用 utf8mb4 的字符集。那么为什么我会收到错误消息?