2
0
Files
gitcaddy-server/models/migrations/v1_26/v336.go
logikonline 7debd1ada3 feat(issues): add external user tracking for app integration
Adds ExternalUserID and ExternalSource fields to issues table to allow external apps to track their own user identifiers when creating issues via API. Includes database migration v336, search filters, JSON API endpoint, and UI filter option. Adds locale strings across all 28 languages for external user filtering.
2026-01-22 15:23:23 -05:00

20 lines
523 B
Go

// Copyright 2026 MarketAlly. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_26
import (
"xorm.io/xorm"
)
// AddExternalUserFieldsToIssue adds ExternalUserID and ExternalSource columns to the issue table
// These fields allow apps to track their own user IDs for issues submitted via the API
func AddExternalUserFieldsToIssue(x *xorm.Engine) error {
type Issue struct {
ExternalUserID string `xorm:"INDEX VARCHAR(255)"`
ExternalSource string `xorm:"VARCHAR(100)"`
}
return x.Sync(new(Issue))
}