I have try to addAttributeOption() integer value add in database using my code.
But i have facing on error message when i have add integer value in CSV
(1) Not Working CSV:- 70024,70014,70010,70624,70040,70017,70014,70010
(2) Working CSV:- A550-24,B55014,C55010,D94624,E75040,F75017,G75014,H75010,I55334
Error message is SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
My part of code is
foreach ($attribute_arr as $key=>$value) {
$option['value'][$value][0]=$value;
foreach($allStores as $skey =>$svalue){
$option['value'][$value][$skey] = $value;
}
}
$eavSetup = $this->_eavSetupFactory->create();
$eavSetup->addAttributeOption($option);