php - Magento Product Insert Error -
i installed magento 1.9.1 , took tables magento 1.5 database.
made necessary changes, making request normally, registering client normally, changing product normally.
however, when trying add new product, error:
sqlstate[23000]: integrity constraint violation: 1062 duplicate entry '25811-1' key 'idx_stock_product'
the query was:
insert `cataloginventory_stock_item` (`product_id`, `stock_id`, `qty`, `use_config_min_qty`, `is_qty_decimal`, `backorders`, `use_config_backorders`, `use_config_min_sale_qty`, `use_config_max_sale_qty`, `is_in_stock`, `low_stock_date`, `use_config_notify_stock_qty`, `use_config_manage_stock`, `stock_status_changed_automatically`, `use_config_qty_increments`, `use_config_enable_qty_increments`) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
the unique changes saw in product tables column stock_status_changed_automaticall
in magento 1.5 called stock_status_changed_auto
changed in new store.
change error persists.
this mysql error not magento error.
a unique index has value, meaning there row exists in table unique id of "25811-1". can remove row, or assign new id new rows adding table. in other words cannot re-add id "25811-1" need insert @ "25811-2" or whatever not taken.
most has happened new constraint added table better indexing. way fix without modifying data set mysql starting index id after last record in table. not use don't know how indexes built along lines of:
alter table auto_increment=123456; //you might need build via composite indexes
Comments
Post a Comment