`CREATE TABLE IF NOT EXISTS `Odin`.`Usuario` (
`CodUsuario` INT NOT NULL AUTO_INCREMENT,
`CodTipoUsuario` INT NOT NULL,
`CodConsultorTecnico` INT NULL,
`CodProdutor` INT NULL,
`Login` VARCHAR(255) CHARACTER SET 'utf8mb4' NOT NULL,
`Senha` VARCHAR(32) CHARACTER SET 'utf8mb4' NOT NULL,
`Ativo` TINYINT(1) NOT NULL,
`MaiorDataRegistrada` DATETIME NOT NULL,
`DataLimite` DATETIME NOT NULL DEFAULT '01/01/2014',
`MaxFazendas` INT NOT NULL DEFAULT 0,
`MaxFemeas` INT NOT NULL DEFAULT 0,
`CodUserWeb` INT NOT NULL DEFAULT 0,
`CodEstudante` INT NULL,
`UltimoBackup` DATETIME NULL,
PRIMARY KEY (`CodUsuario`),
UNIQUE INDEX `UQ__Usuario__00000000000006D8` (`Login` ASC),
CONSTRAINT `FK_Usu_ref_Est`
FOREIGN KEY (`CodEstudante`)
REFERENCES `Odin`.`Estudante` (`CodEstudante`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `Fk_Usuario_Ref_Consultor`
FOREIGN KEY (`CodConsultorTecnico`)
REFERENCES `Odin`.`ConsultorTecnico` (`CodConsultorTecnico`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `Fk_Usuario_Ref_Produtor`
FOREIGN KEY (`CodProdutor`)
REFERENCES `Odin`.`Produtor` (`CodProdutor`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `Fk_Usuario_Ref_TipoUsuario`
FOREIGN KEY (`CodTipoUsuario`)
REFERENCES `Odin`.`ConfTipoUsuario` (`CodTipoUsuario`)
ON DELETE NO ACTION
ON UPDATE NO ACTION) `
I've tried solutions such as: ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; or ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf8_unicode_ci;
or ADD UNIQUE
and still continue with the error:
1071 - Specified key was too long; max key length is 767 bytes
Can someone help me? Thank you