Data-migration-tool: 2.3 - Base table or view not found: 1146 Table 'magento2_prod.inventory_stock' doesn't exist after conversion

Created on 7 Dec 2018  路  5Comments  路  Source: magento/data-migration-tool

Preconditions

  1. Magento 1.14.4.0 EE
  2. Magento 2.3.0 EE
  3. PHP 7.1.24
  4. MySQL 5.7.24

Steps to reproduce

  1. Convert settings and data from Magento 1
  2. Run bin/magento index:reindex

Expected result

  1. No error with inventory_stock. Table should be cataloginventory_stock?

Actual result

This is the output of data migration tool:

[2018-12-07 11:50:29][INFO][mode: data][stage: volume check][step: Inventory Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-12-07 11:50:29][WARNING]: Mismatch of entities in the document: inventory_source_item Source: 6126 Destination: 6119
[2018-12-07 11:50:29][WARNING]: Volume Check failed

This is the issue running bin/magento index:reindex

Inventory indexer process unknown error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2_prod.inventory_stock' doesn't exist, query was: SELECT `inventory_stock`.`stock_id` FROM `inventory_stock`

Additional notes

Most helpful comment

Hi, would you consider sharing your solution of the problem ?

I have the same issue.

All 5 comments

Hi @craigcarnell

Do you see any other inventory_* tables in your M2 DB?

@victor-v-rad After setup, I have intentory_* tables. But after running indexing I don't have any tables starting with inventory_* at all!

Also, when I try to run a post install script I wrote, I also see this error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2_prod.inventory_stock' doesn't exist, query was: SELECT `inventory_stock`.* FROM `inventory_stock` WHERE (`inventory_stock`.`stock_id`=1)

The only thing the script does is set an attribute value and then save the product (nothing to do with inventory)

When viewing the frontend I get this error:

[2018-12-08 14:27:19] report.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2_prod.inventory_stock_sales_channel' doesn't exist, query was: SELECT `inventory_stock_sales_channel`.`stock_id` FROM `inventory_stock_sales_channel` WHERE (type = 'website') AND (code = 'uk') [] []

This is my indexer_state table:

state_id    indexer_id  status  updated hash_config
20  catalog_category_flat   invalid 2018-12-07 12:31:36 e6a117e283e0ea6606bb6609429350ec
3   catalog_category_product    valid   2018-12-07 12:28:50 2124d5bfcd83b609c67eee94a0e4708c
6   catalog_product_attribute   valid   2018-12-07 12:29:00 f73cae77ec4dee3b587a60a2f38dd26a
4   catalog_product_category    valid   2018-12-07 12:28:50 77b6356629f3259568a68ea64c773238
19  catalog_product_flat    invalid 2018-12-07 12:31:36 4bab4debcc94e5fee020709a540eb42d
10  catalog_product_price   invalid 2018-12-07 12:31:36 cbab4723efb02ca24e1db167ef1dfd13
9   cataloginventory_stock  valid   2018-12-07 12:29:02 1bf66e64558a5171e523b32f25cb99ca
8   catalogrule_product valid   2018-12-07 12:28:50 667205576ee3764b1ee81c4a076d10ae
5   catalogrule_rule    valid   2018-12-07 12:28:50 c4f8344a2e6a7d8ebc065631454a4724
14  catalogsearch_fulltext  valid   2018-12-07 12:30:07 f7969233b1a7e0a88687f63b60edb602
2   customer_grid   valid   2018-12-07 12:31:39 b9632e06cf957d6e8103eb236ca38cc1
1   design_config_grid  valid   2018-12-07 12:31:38 34ec592bfa6c952bed4d0a1d58c98770
15  mirasvit_search_score_rule_product  valid   2018-12-07 12:30:07 132f11199c94014055c3c01723c78ec5
18  mst_misspell    valid   2018-12-07 12:31:13 aa5808ab272921b5b8687c4f6964643f
17  salesrule_rule  valid   2018-12-07 12:31:08 213fdc402b507c87f88134583bb0c9d9
12  targetrule_product_rule valid   2018-12-07 12:29:12 55af0f132230456b1f0c5ccb03e30c7c
13  targetrule_rule_product valid   2018-12-07 12:29:12 3f674acb9a7455f8367357b04f1424f2

Found the source of the problem closing this.

Hi, would you consider sharing your solution of the problem ?

I have the same issue.

Hi, while migrating data from 1.14.2.1 to 2.3.1 we are getting below error.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1.salesrule' doesn't exist.

In the database this table exists in m2 database, but not sure why its going to check in 2.3.1

Can anyone have idea about it.

Was this page helpful?
0 / 5 - 0 ratings