Skip to content

Commit caf92f9

Browse files
committed
Improve DB format
1 parent bd3e9e7 commit caf92f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

models/lfs_lock.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717
// LFSLock represents a git lfs lock of repository.
1818
type LFSLock struct {
1919
ID int64 `xorm:"pk autoincr"`
20-
RepoID int64 `xorm:"INDEX"`
20+
RepoID int64 `xorm:"UNIQUE(path_by_repo) INDEX NOT NULL"`
2121
Owner *User `xorm:"-"`
22-
OwnerID int64 `xorm:"INDEX"`
23-
Path string `xorm:"TEXT"`
22+
OwnerID int64 `xorm:"INDEX NOT NULL"`
23+
Path string `xorm:"TEXT UNIQUE(path_by_repo)"`
2424
Created time.Time `xorm:"created"`
2525
}
2626

0 commit comments

Comments
 (0)