FK constraint fails while inserting into child on Disjoint tables
Equal both type ENUM values.




CREATE TABLE `item` (
  id int NOT NULL AUTO_INCREMENT,
  type ENUM('label', 'checkbox') NOT NULL DEFAULT 'label',
  PRIMARY KEY (id, type)
  );



✓






CREATE TABLE checkbox (
  item_id INT NOT NULL,
  item_type ENUM('label', 'checkbox') NOT NULL DEFAULT 'checkbox',
  reviewer INT NOT NULL,
  PRIMARY KEY(item_id, item_type, reviewer),
  CONSTRAINT `fk_2` FOREIGN KEY (item_id, item_type) 
                    REFERENCES `item` (id, type) ON DELETE NO ACTION ON UPDATE CASCADE
  );



✓






INSERT INTO item VALUES(1,'checkbox');



✓






INSERT INTO checkbox VALUES(1,'checkbox', 1);



✓



dbfiddle here