Solved: inventory_stock_1 Doesn’t Exist in Magento 2
Magento 2 is widely used CMS to create online stores. Owing to its flexibility of customization, the platform is suitable for modern business requirements.
However, sometimes the developers are stuck with errors while developing custom functionalities or performing any operations on the Magento 2 store.
Today, I’ll talk about one such error that says,
inventory_stock_1 Doesn’t Exist
The inventory_stock_1 Doesn’t Exist error occurs while importing database in Magento 2.
For example, you are moving Magento 2 from localhost to server for which you need to import database.
The solution to inventory_stock_1 Doesn’t Exist in Magento 2 is the SQL query given below for you to refer:
Solution to the error “inventory_stock_1 Doesn’t Exist” in Magento 2:
Run the below SQL query:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
CREATE OR REPLACE VIEW `inventory_stock_1` AS select distinct `legacy_stock_status`.`product_id` AS `product_id`, `legacy_stock_status`.`website_id` AS `website_id`, `legacy_stock_status`.`stock_id` AS `stock_id`, `legacy_stock_status`.`qty` AS `quantity`, `legacy_stock_status`.`stock_status` AS `is_salable`, `product`.`sku` AS `sku` from ( `cataloginventory_stock_status` `legacy_stock_status` join `catalog_product_entity` `product` on (( `legacy_stock_status`.`product_id` = `product`.`entity_id` ))); |
That’s it.
Any doubts about this error can be mentioned in the Comments section below. I’ll help you out.
Also, do share the solution with Magento developers via social media.
Thank you.
Jignesh Parmar
An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.
2 Comments
how can i set Salable Quantity equal to Quanity amount when i was adding product
Hey Robyn we cannot manually add or edit the salable Quantity,
Hence, when you add new product your Default Quantity will be your salable Quantity.