DB: task dependencies should be cascade-deleted with their tasks
This commit is contained in:
parent
a9790ec579
commit
8e01c069d1
@ -62,7 +62,7 @@ type Task struct {
|
||||
// TODO: include info about which worker is/was working on this.
|
||||
|
||||
// Dependencies are tasks that need to be completed before this one can run.
|
||||
Dependencies []*Task `gorm:"many2many:task_dependencies;"`
|
||||
Dependencies []*Task `gorm:"many2many:task_dependencies;constraint:OnDelete:CASCADE"`
|
||||
|
||||
Commands Commands `gorm:"type:jsonb"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user