// Copyright 2026 Moko Consulting <hello@mokoconsulting.tech>
// SPDX-License-Identifier: GPL-3.0-or-later

package v1_27

import "xorm.io/xorm"

// AddManifestDistributionFields adds distribution metadata fields to repo_manifest
// for update server feed generation (consolidating from UpdateStreamConfig).
func AddManifestDistributionFields(x *xorm.Engine) error {
	type RepoManifest struct {
		DisplayName   string `xorm:"TEXT 'display_name'"`
		Maintainer    string `xorm:"TEXT 'maintainer'"`
		MaintainerURL string `xorm:"TEXT 'maintainer_url'"`
		InfoURL       string `xorm:"TEXT 'info_url'"`
		TargetVersion string `xorm:"TEXT 'target_version'"`
		PHPMinimum    string `xorm:"VARCHAR(20) 'php_minimum'"`
	}
	return x.Sync(new(RepoManifest))
}
