MySQL Error 1452 but parent table exists and data types are the same
Here’s the total error:
pymysql.err.IntegrityError: (1452, ‘Cannot add or update a child row: a foreign key constraint fails (ncbi
.chromosomes
, CONSTRAINT chromosomes_ibfk_1
FOREIGN KEY (accession_id
) REFERENCES species
(accession_id
) ON DELETE CASCADE)’)