🛒 Magento_SalesRule · engine innodb
salesrule
Salesrule
Neighbourhood (1-hop foreign-key graph — showing 6 of 6)
flowchart LR c["salesrule"]:::center n0["salesrule_product_attribute"] click n0 "/schema/table/salesrule_product_attribute" c -- rule_id --> n0 n1["salesrule_coupon"] click n1 "/schema/table/salesrule_coupon" c -- rule_id --> n1 n2["salesrule_customer"] click n2 "/schema/table/salesrule_customer" c -- rule_id --> n2 n3["salesrule_customer_group"] click n3 "/schema/table/salesrule_customer_group" c -- rule_id --> n3 n4["salesrule_label"] click n4 "/schema/table/salesrule_label" c -- rule_id --> n4 n5["salesrule_website"] click n5 "/schema/table/salesrule_website" c -- rule_id --> n5 click c "/schema/table/salesrule" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (6)
Columns (24)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| simple_free_shipping | smallint unsigned | yes | null | Simple Free Shipping |
| rule_id PK | int unsigned | no | Entity ID | |
| name | varchar(255) | yes | Name | |
| description | text | yes | Description | |
| from_date | date | yes | From | |
| to_date | date | yes | To | |
| uses_per_customer | int | no | 0 | Uses Per Customer |
| is_active | smallint | no | 0 | Is Active |
| conditions_serialized | mediumtext | yes | Conditions Serialized | |
| actions_serialized | mediumtext | yes | Actions Serialized | |
| stop_rules_processing | smallint | no | 1 | Stop Rules Processing |
| is_advanced | smallint unsigned | no | 1 | Is Advanced |
| product_ids | text | yes | Product Ids | |
| sort_order | int unsigned | no | 0 | Sort Order |
| simple_action | varchar(32) | yes | Simple Action | |
| discount_amount | decimal | no | 0 | Discount Amount |
| discount_qty | decimal | yes | Discount Qty | |
| discount_step | int unsigned | no | 0 | Discount Step |
| apply_to_shipping | smallint unsigned | no | 0 | Apply To Shipping |
| times_used | int | no | 0 | Times Used |
| is_rss | smallint | no | 0 | Is Rss |
| coupon_type | smallint unsigned | no | 1 | Coupon Type |
| use_auto_generation | smallint | no | 0 | Use Auto Generation |
| uses_per_coupon | int | no | 0 | User Per Coupon |
Keys & indexes
Primary key: rule_id
Indexes
- SALESRULE_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE (is_active, sort_order, to_date, from_date) btree
Referenced by (6)
- salesrule_coupon .rule_id → .rule_id (on delete CASCADE)
- salesrule_customer .rule_id → .rule_id (on delete CASCADE)
- salesrule_customer_group .rule_id → .rule_id (on delete CASCADE)
- salesrule_label .rule_id → .rule_id (on delete CASCADE)
- salesrule_product_attribute .rule_id → .rule_id (on delete CASCADE)
- salesrule_website .rule_id → .rule_id (on delete CASCADE)