If goal is return to single store (disable the bugged multistore) fix is on this query
INSERT INTO `ps_category_shop` ( `id_category` , `id_shop` , `position` )
SELECT id_category, 1, 0
FROM `ps_category`
WHERE id_category NOT
IN (
SELECT id_category
FROM `ps_category_shop`
)