2022-11-22 19:48:27 +08:00
|
|
|
package migrations
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"xorm.io/xorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
func addActivityTimeline(x *xorm.Engine) error {
|
2022-11-23 11:07:28 +08:00
|
|
|
type Revision struct {
|
2022-11-22 19:48:27 +08:00
|
|
|
ReviewUserID int64 `xorm:"not null default 0 BIGINT(20) review_user_id"`
|
|
|
|
}
|
|
|
|
type Activity struct {
|
|
|
|
CancelledAt time.Time `xorm:"TIMESTAMP cancelled_at"`
|
|
|
|
RevisionID int64 `xorm:"not null default 0 BIGINT(20) revision_id"`
|
|
|
|
OriginalObjectID string `xorm:"not null default 0 BIGINT(20) original_object_id"`
|
|
|
|
}
|
2022-11-23 11:07:28 +08:00
|
|
|
return x.Sync(new(Activity), new(Revision))
|
2022-11-22 19:48:27 +08:00
|
|
|
}
|