I made a script that updates the stock status in database. I change them in the table named "cataloginventory_stock_status", but the changes doesn't appear on backend when I search for products by id. So I thought that it needs reindex. So I did that, but the problem is that after reindex the value of stock_status is changed back to what it was before.
I saw that is another table called "cataloginventory_stock_status_idx" so I tried to change the stock_staus here too (it seems like this tables are the same). But with no luck, the changes doesn't apply to the product on backend/frontend and after reindex my values put in the database are updated with the old ones.
I had to to this also for a custom attribute in the "catalog_product_flat_1" table. Same problem here.
Can you please help me with this? Do I have to change the stock_status of a product in another table, do I look at the wrong tables?