Kiedy wykonywane następujące polecenie:Określony klucz był zbyt długi - max długość klucza wynosi 767 bajtów
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;
Mam ten komunikat o błędzie:
Specified key was too long; max key length is 767 bytes
Używam charset z utf8mb4. Dlaczego otrzymałem komunikat o błędzie?
działa na moim serwerze – zerkms
możliwym duplikatu [# 1071 - Określony klucz był zbyt długi; maksymalna długość klucza to 767 bajtów] (http://stackoverflow.com/questions/1814532/1071-specyfikowany-kluczowy-to-long-max-key- length-is-767-bytes) –