🛒 Magento_SalesRule · engine innodb
salesrule_customer
Salesrule Customer
Neighbourhood (1-hop foreign-key graph — showing 2 of 2)
flowchart LR c["salesrule_customer"]:::center n0["customer_entity"] click n0 "/schema/table/customer_entity" n0 -- customer_id --> c n1["salesrule"] click n1 "/schema/table/salesrule" n1 -- rule_id --> c click c "/schema/table/salesrule_customer" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (2)
Columns (4)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| rule_customer_id PK | int unsigned | no | Rule Customer ID | |
| rule_id | int unsigned | no | 0 | Rule ID |
| customer_id | int unsigned | no | 0 | Customer ID |
| times_used | smallint unsigned | no | 0 | Times Used |
Keys & indexes
Primary key: rule_customer_id
Indexes
- SALESRULE_CUSTOMER_RULE_ID_CUSTOMER_ID (rule_id, customer_id) btree
- SALESRULE_CUSTOMER_CUSTOMER_ID_RULE_ID (customer_id, rule_id) btree
References (2)
- customer_id → customer_entity .entity_id (on delete CASCADE)
- rule_id → salesrule .rule_id (on delete CASCADE)