diff options
author | 6543 <6543@obermui.de> | 2020-06-09 22:34:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 16:34:05 -0400 |
commit | 363e51d19c7ae63a12554fbfb4dd4f59e87db339 (patch) | |
tree | 9a4268f55796fe07c387d7169925a5de46180a02 /models/migrations/v116.go | |
parent | aaff47ad75e167838a886126ddba0ad8f6f1d073 (diff) | |
download | gitea-363e51d19c7ae63a12554fbfb4dd4f59e87db339.tar.gz gitea-363e51d19c7ae63a12554fbfb4dd4f59e87db339.zip |
Refactor: Remove Dependencys from Migration v112-v119 (#11811)
* v119
* v116
* v112
Diffstat (limited to 'models/migrations/v116.go')
-rw-r--r-- | models/migrations/v116.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/models/migrations/v116.go b/models/migrations/v116.go index 6587d02f13..254d4e7a19 100644 --- a/models/migrations/v116.go +++ b/models/migrations/v116.go @@ -5,12 +5,16 @@ package migrations import ( - "code.gitea.io/gitea/models" - "xorm.io/xorm" ) func extendTrackedTimes(x *xorm.Engine) error { + + type TrackedTime struct { + Time int64 `xorm:"NOT NULL"` + Deleted bool `xorm:"NOT NULL DEFAULT false"` + } + sess := x.NewSession() defer sess.Close() @@ -22,7 +26,7 @@ func extendTrackedTimes(x *xorm.Engine) error { return err } - if err := sess.Sync2(new(models.TrackedTime)); err != nil { + if err := sess.Sync2(new(TrackedTime)); err != nil { return err } |