🛒 Magento_SalesRule · engine innodb
salesrule_coupon
Salesrule Coupon
Neighbourhood (1-hop foreign-key graph — showing 2 of 2)
flowchart LR c["salesrule_coupon"]:::center n0["salesrule"] click n0 "/schema/table/salesrule" n0 -- rule_id --> c n1["salesrule_coupon_usage"] click n1 "/schema/table/salesrule_coupon_usage" c -- coupon_id --> n1 click c "/schema/table/salesrule_coupon" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (2)
Columns (10)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| coupon_id PK | int unsigned | no | Coupon ID | |
| rule_id | int unsigned | no | Rule ID | |
| code | varchar(255) | yes | Code | |
| usage_limit | int unsigned | yes | Usage Limit | |
| usage_per_customer | int unsigned | yes | Usage Per Customer | |
| times_used | int unsigned | no | 0 | Times Used |
| expiration_date | datetime | yes | Expiration Date | |
| is_primary | smallint unsigned | yes | Is Primary | |
| created_at | timestamp | yes | Coupon Code Creation Date | |
| type | smallint | yes | 0 | Coupon Code Type |
Keys & indexes
Primary key: coupon_id
Unique
- SALESRULE_COUPON_CODE (code)
- SALESRULE_COUPON_RULE_ID_IS_PRIMARY (rule_id, is_primary)
Indexes
- SALESRULE_COUPON_RULE_ID (rule_id) btree
References (1)
- rule_id → salesrule .rule_id (on delete CASCADE)
Referenced by (1)
- salesrule_coupon_usage .coupon_id → .coupon_id (on delete CASCADE)