-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Database Schema: Incorrect Unique Indexes #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I totally support your point concerning website_id in stock tables. Even if it is a part of multiwarehouse feature, website_id should not be in any of the following tables, it is easier to make a relation between website and stock via configuration. Let's imagine we have a company that sells to US/CA market and EU market, they have a website for each country. But there is only 2 warehouses: EU warehouse in Germany and US/CA warehouse in US. Hope it will clarify the idea of separation stock scope from table level to a configuration, that is IMO much more flexible and has less performance/data size penalty. |
Thank you for reporting the issue. This issue will be fixed in context of other inventory improvements. |
From I see, the website_id is now 1 for all created product, right? |
Given that the default website = 0 for stock id =1 in table cataloginventory_stock, this suggests that all website IDs should be 0. @hoanglan87 believes that all website_ids should be 1, and the code in module-catalog-inventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php equates website_id to stock_id so that seems to make it always 1. If I set all website_ids to 0 in cataloginventory_stock_item and reindex then I get a mixture of entries for website_id 0 and 1. This may explain some anomalous results with configurable products going in and out of stock. Please could there be a definitive statement on this "functionality". |
Any updates? |
Hi, Regarding unique key on (product_id,website_id) in cataloginventory_stock_item table it's legacy, and in the scope of Multi Location Inventory track has already been fixed, but it's still not in mainline. Correct index is (product_id,stock_id) as you mentioned in your post. Knowledge about Website_Id are already eliminated from CatalogInventory data interfaces both from
It's true, so in the scope of MLI we will deliver Link interface which describe the relationship between Source (MLI interface which describes physical Stock extending basic Stock interface from CatalogInventory module) and Website.
There is also Repository interface to manage this entity. All the links belonging to Source (Stock) would be available through the Source DTO
|
Still tracking internally as MAGETWO-33564 for mainline fix |
Bugs fixed: * MAGETWO-33564: [GitHub] Database Schema: Incorrect Unique Indexes #1002 * MAGETWO-56095: When category has products that are not visible to catalog the pager still shows is this expected behavior? * MAGETWO-59649: Current store resolver does not work for global scope * MAGETWO-60962: New attribute is not visible when create new address * MAGETWO-55937: [Complex product/Grouped productsl] Tax Amount and Custom Prices isn't displayed on Slide Panel (admin panel)
Has this now been fixed on the 16th of Dec 2016? |
@SchumacherFM fixed in develop, not yet backported to 2.0 and 2.1. |
- MAGETWO-66322 Dump env-specific and sensitive variables to env config file - MAGETWO-64317 POST request to /setup/index.php/session/prolong returns successful json - MAGETWO-66969 PreparedValueFactory issues
The fix MAGETWO-33564 will be available with release 2.2.0 soon |
While such an announcement is mildly reassuring, it raises a couple follow-up questions.
Best regards & would be glad if someone could answer these |
Hi @korostii |
Hi @magento-engcom-team, thanks for the general information. What I am asking is: how do I find out whether you plan to backport this exact issue based on its state and labels? There's obviously more job to be done here, yet it's "closed", so state doesn't help much here. Does the label help? I don't see the |
Hi @korostii Project columns will reflect the internal ticket status on public GitHub |
Ok, that's something already. Thanks for this valuable piece of information. So now I can search for #1002 on project Still, how should I know whether this issue is "the job is done, nothing more to do here" or "we aren't gonna backport ourselves, feel free to make backport PRs" without looking inside it? just from the issue list? Do you see my point? Closing unresolved acknowledged issues is harmful for the overall progress of the project. Closing the issue will get the issue ignored, and then reported again (but later) and the bug will stay for longer. Please don't close unresolved issues, we've got enough mess in this issue tracker as it is. |
To re-iterate: currently there is no way to filter out unresolved acknowledged issues (like this one) on the issue list. I seriously don't understand how do you expect people to help you resolving issues while at the same time you're not even able to provide them with a list of such issues. Please reopen this issue. Please keep it open unless it resolved: I think it's reasonable and the least you could do. Does that make sense for you? If you disagree, with this approach, please explain why at least one. I'm tired of seeeing this happen over and over again with zero justification and I don't understand why you guys do it. |
- Merge Pull Request magento/graphql-ce#1002 from TomashKhamlai/graphql-ce:coverage-downloadable-links-data-provider - Merged commits: 1. 7dc9e64 2. f45a672
Hi @SchumacherFM. Thank you for your report.
The fix will be available with the upcoming 2.4.0 release. |
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 nameUNQ_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 columnwebsite_id
is totally wrong. In tablecataloginventory_stock
you also have added the columnwebsite_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!
The text was updated successfully, but these errors were encountered: