- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9.4k
Description
Regarding my database inspections for migrating Mage1->2 I've found this thing:
The unique key which conflicts is in table cataloginventory_stock_item with the name
UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_WEBSITE_ID for (product_id,website_id).
IMHO: This does not make sense because of the column stock_id. The unique key must be on (product_id,stock_id). This newly introduced column website_id is totally wrong. In table cataloginventory_stock you also have added the column website_id which doesn't make sense.
You can still have the same stock_id associated to multiple website_ids or vice versa; so a third table would be necessary for assigning stock_ids to website_ids.
The current solution in table cataloginventory_stock looks like that for each website you must create its own stock_id ... 👎
If I'm absolutely wrong with my IMHO a short explanation would be great on what kind of "multiwarehouse" feature you are working on!