I have create custom module to create custom option with the reference of this "https://meetanshi.com/blog/create-custom-options-programmatically-in-magento-2/" page.
I'm getting bellow error for this "$option->save();
" method.
a:4:{i:0;s:277:"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-0' for key 'CATALOG_PRODUCT_OPTION_TYPE_PRICE_OPTION_TYPE_ID_STORE_ID', query was: INSERT INTO
catalog_product_option_type_price
(option_type_id
,store_id
,price
,price_type
) VALUES (?, ?, ?, ?)";i:1;s:7500:"#0 /app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95):
I have already try with reindex and FOREIGN_KEY_CHECKS, but still getting error.