0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-13 16:52:14 +01:00
2025-12-05 20:01:56 -08:00

31 lines
1.0 KiB
Go

// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_26
import (
"code.gitea.io/gitea/modules/timeutil"
"xorm.io/xorm"
)
// AddRenderPluginTable creates the render_plugin table used by the frontend plugin system.
func AddRenderPluginTable(x *xorm.Engine) error {
type RenderPlugin struct {
ID int64 `xorm:"pk autoincr"`
Identifier string `xorm:"UNIQUE NOT NULL"`
Name string `xorm:"NOT NULL"`
Version string `xorm:"NOT NULL"`
Description string `xorm:"TEXT"`
Source string `xorm:"TEXT"`
Entry string `xorm:"NOT NULL"`
FilePatterns []string `xorm:"JSON"`
FormatVersion int `xorm:"NOT NULL DEFAULT 1"`
Enabled bool `xorm:"NOT NULL DEFAULT false"`
CreatedUnix timeutil.TimeStamp `xorm:"created NOT NULL"`
UpdatedUnix timeutil.TimeStamp `xorm:"updated NOT NULL"`
}
return x.Sync(new(RenderPlugin))
}