Why can not I give a foreign key constraint?
ERROR 1215: Cannot add foreign key constraint
SQL Statement:
CREATE TABLE `arena`.`like_history` (
`p_id` INT(11) NOT NULL,
`u_id` INT(11) NOT NULL,
`ldate` DATETIME NOT NULL,
PRIMARY KEY (`p_id`, `u_id`),
INDEX `u_id_idx` (`u_id` ASC),
CONSTRAINT `p_id`
FOREIGN KEY (`p_id`)
REFERENCES `arena`.`picture` (`p_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
CONSTRAINT `u_id`
FOREIGN KEY (`u_id`)
REFERENCES `arena`.`user` (`ul_id`)
ON DELETE CASCADE
ON UPDATE CASCADE)