Skip to content

Commit ae61ccd

Browse files
committed
remove INDEX
1 parent 8f5a70d commit ae61ccd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

models/migrations/v1_23/v305.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func AddRepositoryLicenses(x *xorm.Engine) error {
1414
ID int64 `xorm:"pk autoincr"`
1515
RepoID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"`
1616
CommitID string
17-
License string `xorm:"VARCHAR UNIQUE(s) INDEX NOT NULL"`
17+
License string `xorm:"VARCHAR UNIQUE(s) NOT NULL"`
1818
CreatedUnix timeutil.TimeStamp `xorm:"INDEX CREATED"`
1919
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX UPDATED"`
2020
}

models/repo/license.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ func init() {
1515
}
1616

1717
type RepoLicense struct { //revive:disable-line:exported
18-
ID int64 `xorm:"pk autoincr"`
19-
RepoID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"`
20-
CommitID string
21-
// TODO: `INDEX` will be used to find repositories by license
22-
License string `xorm:"VARCHAR UNIQUE(s) INDEX NOT NULL"`
18+
ID int64 `xorm:"pk autoincr"`
19+
RepoID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"`
20+
CommitID string
21+
License string `xorm:"VARCHAR UNIQUE(s) NOT NULL"`
2322
CreatedUnix timeutil.TimeStamp `xorm:"INDEX CREATED"`
2423
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX UPDATED"`
2524
}

0 commit comments

Comments
 (0)