MageSmith

🛒 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.

Columns (10)

NameTypeNullDefaultComment
coupon_id PKint unsignednoCoupon ID
rule_id int unsignednoRule ID
code varchar(255) yesCode
usage_limit int unsignedyesUsage Limit
usage_per_customer int unsignedyesUsage Per Customer
times_used int unsignedno0Times Used
expiration_date datetime yesExpiration Date
is_primary smallint unsignedyesIs Primary
created_at timestamp yesCoupon Code Creation Date
type smallint yes0Coupon 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)