0

I am attempting to disable Catalog Staging without starting over. I ran this command

bin/magento mo:d Magento_CatalogStaging Magento_CatalogImportExportStaging Magento_BundleStaging Magento_ConfigurableProductStaging Magento_CatalogUrlRewriteStaging Magento_DownloadableStaging Magento_WeeeStaging Magento_CatalogInventoryStaging

However, it creates this query error below which doesn't seem to make sense because the value '0-79-0' means that the first 0 should reference an entity_id but I do not have a row_id or entity_id with the value of 0(obviously).

 Integrity constraint violation: 1062 Duplicate entry '0-79-0' for key 'CATALOG_PRODUCT_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID', query was: ALTER TABLE `catalog_product_entity_datetime` ADD COLUMN `entity_id` int(10) UNSIGNED NOT NULL DEFAULT 0  COMMENT "Entity ID", DROP COLUMN `row_id`, DROP KEY `CATALOG_PRODUCT_ENTITY_DATETIME_ROW_ID_ATTRIBUTE_ID_STORE_ID`, ADD CONSTRAINT `CAT_PRD_ENTT_DTIME_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`)  ON DELETE CASCADE, ADD CONSTRAINT `CATALOG_PRODUCT_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` UNIQUE KEY (`entity_id`,`attribute_id`,`store_id`)

I have tried to run a query checking for any duplicates in general but I am not getting anything.

0

The issue was the attributes were already created on this instance, so attribute 79 represented special_from_date which is not supposed to be in commerce because you are supposed to manage the attributes through staging not using attribute dates to set when a product is new or special. I went and deleted the individual attributes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.