// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_26

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

	"xorm.io/xorm"
)

// AddReleaseArchiveColumns adds IsArchived and ArchivedUnix columns to the release table
func AddReleaseArchiveColumns(x *xorm.Engine) error {
	type Release struct {
		IsArchived   bool               `xorm:"NOT NULL DEFAULT false"`
		ArchivedUnix timeutil.TimeStamp `xorm:"INDEX"`
	}

	return x.Sync(new(Release))
}
