Why am I getting MySQL error 1822 when creating a new table with a FOREIGN KEY?
I tried CREATE TABLE `valorant`.`abilities` ( `PlayerId` INT NOT NULL, `AgentName` VARCHAR(45) NOT NULL, `AbilityName` VARCHAR(45) NOT NULL, `KeyBind` VARCHAR(45) NULL, `Cost` INT NULL, PRIMARY KEY (`PlayerId`, `AgentName`, `AbilityName`)); CREATE TABLE `valorant`.`abilitystats` ( `PlayerId` INT NOT NULL, `AgentName` VARCHAR(45) NOT…