Open hanicab opened 5 years ago
Hi @hanicab,
Thanks for your report. I manage to reproduce the issue with PS1.7.6.0beta1 / PS1.7.5.2 & the pscleaner v2.0.0. When we click on Check & fix for the "FUNCTIONAL INTEGRITY CONSTRAINTS" section, the ps_stock_mvt will be empty & we have like a green alert
The following queries successfully fixed broken data:
DELETE FROM `ps_product_attribute_image` WHERE `id_image` NOT IN (SELECT `id_image` FROM `ps_image`)
4 line(s)
DELETE FROM `ps_stock_mvt` WHERE `id_stock` NOT IN (SELECT `id_stock` FROM `ps_stock`)
4 line(s)
I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request! Thanks!
Describe the bug When we click 'repair database' bouton, the module empties the table 'stock_mvt' and delete all existing columns in this table.
To Reproduce Steps to reproduce the behavior:
Cause of problem: I think because in prestashop 1.7.5.0 the table stock is always empty , so when the module try to compare id_stock in the both tables , it will delete all columns of the table 'stock_mvt'
Additionnal information PrestaShop version: 1.7.5.0 PHP version: 7.2