summaryrefslogtreecommitdiffstats
path: root/models/forgejo_migrations/v1_22/v5.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/forgejo_migrations/v1_22/v5.go')
-rw-r--r--models/forgejo_migrations/v1_22/v5.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/models/forgejo_migrations/v1_22/v5.go b/models/forgejo_migrations/v1_22/v5.go
new file mode 100644
index 0000000..55f9fe1
--- /dev/null
+++ b/models/forgejo_migrations/v1_22/v5.go
@@ -0,0 +1,22 @@
+// Copyright 2024 The Forgejo Authors c/o Codeberg e.V.. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package v1_22 //nolint
+
+import (
+ "xorm.io/xorm"
+)
+
+type RepoFlag struct {
+ ID int64 `xorm:"pk autoincr"`
+ RepoID int64 `xorm:"UNIQUE(s) INDEX"`
+ Name string `xorm:"UNIQUE(s) INDEX"`
+}
+
+func (RepoFlag) TableName() string {
+ return "forgejo_repo_flag"
+}
+
+func CreateRepoFlagTable(x *xorm.Engine) error {
+ return x.Sync(new(RepoFlag))
+}