mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-09 00:21:31 +01:00
32 lines
1.1 KiB
Go
32 lines
1.1 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"`
|
|
Permissions []string `xorm:"JSON"`
|
|
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))
|
|
}
|