feat(views)!: decouple bucket <-> task relationship
This commit is contained in:
@ -70,6 +70,11 @@ func (b *Bucket) TableName() string {
|
||||
return "buckets"
|
||||
}
|
||||
|
||||
type TaskBucket struct {
|
||||
BucketID int64 `xorm:"bigint not null index"`
|
||||
TaskID int64 `xorm:"bigint not null index"`
|
||||
}
|
||||
|
||||
func getBucketByID(s *xorm.Session, id int64) (b *Bucket, err error) {
|
||||
b = &Bucket{}
|
||||
exists, err := s.Where("id = ?", id).Get(b)
|
||||
|
@ -112,7 +112,7 @@ type Task struct {
|
||||
// A timestamp when this task was last updated. You cannot change this value.
|
||||
Updated time.Time `xorm:"updated not null" json:"updated"`
|
||||
|
||||
// BucketID is the ID of the kanban bucket this task belongs to.
|
||||
// Deprecated: use the id via the separate entity.
|
||||
BucketID int64 `xorm:"bigint null" json:"bucket_id"`
|
||||
|
||||
// The position of the task - any task project can be sorted as usual by this parameter.
|
||||
|
Reference in New Issue
Block a user