summaryrefslogtreecommitdiffstats
path: root/models/forgejo_migrations/v1_22/v4.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/forgejo_migrations/v1_22/v4.go')
-rw-r--r--models/forgejo_migrations/v1_22/v4.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/models/forgejo_migrations/v1_22/v4.go b/models/forgejo_migrations/v1_22/v4.go
new file mode 100644
index 0000000..f1195f5
--- /dev/null
+++ b/models/forgejo_migrations/v1_22/v4.go
@@ -0,0 +1,17 @@
+// Copyright 2021 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package v1_22 //nolint
+
+import (
+ "xorm.io/xorm"
+)
+
+func AddDefaultPermissionsToRepoUnit(x *xorm.Engine) error {
+ type RepoUnit struct {
+ ID int64
+ DefaultPermissions int `xorm:"NOT NULL DEFAULT 0"`
+ }
+
+ return x.Sync(&RepoUnit{})
+}