0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-11 09:15:31 +02:00

add indices to group_id and group_sort_order column

add migration for repository table
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-08-17 16:13:28 -04:00
parent 3a79b777ce
commit 3f5d64246e
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
2 changed files with 3 additions and 2 deletions

View File

@ -409,6 +409,7 @@ func prepareMigrationTasks() []*migration {
// Gitea 1.26.0 ends at migration ID number 330 (database version 331)
newMigration(331, "Add ActionRunAttempt model and related action fields", v1_27.AddActionRunAttemptModel),
newMigration(332, "Add group_id and group_sort_order columns to repository table", v1_26.AddGroupColumnsToRepositoryTable),
}
return preparedMigrations
}

View File

@ -220,8 +220,8 @@ type Repository struct {
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"`
GroupID int64 `xorm:"DEFAULT NULL"`
GroupSortOrder int
GroupID int64 `xorm:"INDEX DEFAULT NULL"`
GroupSortOrder int `xorm:"INDEX"`
}
func init() {