Set CASCADE deletion for ItemBought from Payment after deletion

This commit is contained in:
qowevisa 2024-11-20 18:18:29 +02:00
parent dbe140ecaf
commit 4244e397f3

View File

@ -18,6 +18,6 @@ type Payment struct {
Title string Title string
Descr string Descr string
Note string Note string
Items []ItemBought Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"`
Date time.Time Date time.Time
} }