From 94d4b241b3ce036b5ab9ac9843273343e0bf59e6 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Mon, 8 Apr 2024 12:55:05 +0200 Subject: [PATCH] Resolve conflicts --- models/forgejo_migrations/v1_22/v11.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 models/forgejo_migrations/v1_22/v11.go diff --git a/models/forgejo_migrations/v1_22/v11.go b/models/forgejo_migrations/v1_22/v11.go new file mode 100644 index 0000000000..6822524705 --- /dev/null +++ b/models/forgejo_migrations/v1_22/v11.go @@ -0,0 +1,18 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package v1_22 //nolint + +import "xorm.io/xorm" + +func AddRepoArchiveDownloadCount(x *xorm.Engine) error { + type RepoArchiveDownloadCount struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"index unique(s)"` + ReleaseID int64 `xorm:"index unique(s)"` + Type int `xorm:"unique(s)"` + Count int64 + } + + return x.Sync(&RepoArchiveDownloadCount{}) +}