- cmd/gitea-cli: fix errcheck, perfsprint, use modules/json, http constants
- models/migrations: remove unused nolint directive
- models/organization: interface{} -> any
- modules/health: rename HealthResponse -> Response to avoid stutter
- modules/idempotency: use modules/json, fix errcheck, rename IdempotencyInfo -> Info
- modules/structs: fix Verified_At naming, use omitzero
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
1010 B
Go
31 lines
1010 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_26
|
|
|
|
import (
|
|
"code.gitea.io/gitea/modules/timeutil"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
// AddWikiIndexTable adds the wiki_index table for full-text search
|
|
func AddWikiIndexTable(x *xorm.Engine) error {
|
|
type WikiIndex struct {
|
|
ID int64 `xorm:"pk autoincr"`
|
|
RepoID int64 `xorm:"INDEX NOT NULL"`
|
|
PageName string `xorm:"VARCHAR(255) NOT NULL"`
|
|
PagePath string `xorm:"VARCHAR(512) NOT NULL"`
|
|
Title string `xorm:"VARCHAR(255)"`
|
|
Content string `xorm:"LONGTEXT"`
|
|
ContentHash string `xorm:"VARCHAR(64)"`
|
|
CommitSHA string `xorm:"VARCHAR(64)"`
|
|
WordCount int `xorm:"DEFAULT 0"`
|
|
LinksOut string `xorm:"TEXT"`
|
|
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
|
CreatedUnix timeutil.TimeStamp `xorm:"created"`
|
|
}
|
|
|
|
return x.Sync(new(WikiIndex))
|
|
}
|