📦 Magento_CatalogInventory · engine innodb
cataloginventory_stock_item
Cataloginventory Stock Item
Neighbourhood (1-hop foreign-key graph — showing 2 of 2)
flowchart LR c["cataloginventory_stock_item"]:::center n0["catalog_product_entity"] click n0 "/schema/table/catalog_product_entity" n0 -- product_id --> c n1["cataloginventory_stock"] click n1 "/schema/table/cataloginventory_stock" n1 -- stock_id --> c click c "/schema/table/cataloginventory_stock_item" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (2)
Columns (26)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| item_id PK | int unsigned | no | Item ID | |
| product_id | int unsigned | no | 0 | Product ID |
| stock_id | smallint unsigned | no | 0 | Stock ID |
| qty | decimal | yes | Qty | |
| min_qty | decimal | no | 0 | Min Qty |
| use_config_min_qty | smallint unsigned | no | 1 | Use Config Min Qty |
| is_qty_decimal | smallint unsigned | no | 0 | Is Qty Decimal |
| backorders | smallint unsigned | no | 0 | Backorders |
| use_config_backorders | smallint unsigned | no | 1 | Use Config Backorders |
| min_sale_qty | decimal | no | 1 | Min Sale Qty |
| use_config_min_sale_qty | smallint unsigned | no | 1 | Use Config Min Sale Qty |
| max_sale_qty | decimal | no | 0 | Max Sale Qty |
| use_config_max_sale_qty | smallint unsigned | no | 1 | Use Config Max Sale Qty |
| is_in_stock | smallint unsigned | no | 0 | Is In Stock |
| low_stock_date | timestamp | yes | Low Stock Date | |
| notify_stock_qty | decimal | yes | Notify Stock Qty | |
| use_config_notify_stock_qty | smallint unsigned | no | 1 | Use Config Notify Stock Qty |
| manage_stock | smallint unsigned | no | 0 | Manage Stock |
| use_config_manage_stock | smallint unsigned | no | 1 | Use Config Manage Stock |
| stock_status_changed_auto | smallint unsigned | no | 0 | Stock Status Changed Automatically |
| use_config_qty_increments | smallint unsigned | no | 1 | Use Config Qty Increments |
| qty_increments | decimal | no | 0 | Qty Increments |
| use_config_enable_qty_inc | smallint unsigned | no | 1 | Use Config Enable Qty Increments |
| enable_qty_increments | smallint unsigned | no | 0 | Enable Qty Increments |
| is_decimal_divided | smallint unsigned | no | 0 | Is Divided into Multiple Boxes for Shipping |
| website_id | smallint unsigned | no | 0 | Website ID |
Keys & indexes
Primary key: item_id
Unique
- CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID (product_id, stock_id)
Indexes
- CATALOGINVENTORY_STOCK_ITEM_WEBSITE_ID (website_id) btree
- CATALOGINVENTORY_STOCK_ITEM_WEBSITE_ID_PRODUCT_ID (website_id, product_id) btree
- CATALOGINVENTORY_STOCK_ITEM_STOCK_ID (stock_id) btree
References (2)
- product_id → catalog_product_entity .entity_id (on delete CASCADE)
- stock_id → cataloginventory_stock .stock_id (on delete CASCADE)