You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
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:
Add or edit a stock for some products ( to create some stock movments history )
Go to pscleaner module
Click on 'repair database'
go to phpmyadmin and check the table 'stock_mvt'
You will see that the table has become empty
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: