summaryrefslogtreecommitdiffstats
path: root/models/forgejo_migrations/v1_22/v4.go
blob: f1195f5f66893a1afeafc8654891716d3129d067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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{})
}