summaryrefslogtreecommitdiffstats
path: root/models/forgejo_migrations/v1_20/v1.go
blob: 1097613655a6f6b1844e0f90eb0f8333655fdda9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2023 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package forgejo_v1_20 //nolint:revive

import (
	"code.gitea.io/gitea/modules/timeutil"

	"xorm.io/xorm"
)

func AddForgejoBlockedUser(x *xorm.Engine) error {
	type ForgejoBlockedUser struct {
		ID          int64              `xorm:"pk autoincr"`
		BlockID     int64              `xorm:"index"`
		UserID      int64              `xorm:"index"`
		CreatedUnix timeutil.TimeStamp `xorm:"created"`
	}

	return x.Sync(new(ForgejoBlockedUser))
}