Quando ho eseguito il seguente comando:chiave specificata era troppo lungo - max lunghezza della chiave è 767 byte
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;
ho ricevuto questo messaggio di errore:
Specified key was too long; max key length is 767 bytes
Sto usando un set di caratteri di utf8mb4. Allora, perché ho ricevuto il messaggio di errore?
Opere sul mio server – zerkms
possibile duplicato di [# 1071 - specificata chiave è stata troppo a lungo; la lunghezza massima della chiave è 767 byte] (http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes) –