- Drop existing indexes on DeploymentJobTargets and DeploymentJobSteps - Alter Status column to nvarchar(450) in DeploymentJobTargets, DeploymentJobSteps, and DeploymentJobs - Add new columns: Finished, OutputMetadataJson, Started to DeploymentJobTargets; ErrorMessage, Finished, OutputMetadataJson, Started to DeploymentJobSteps; CorrelationId, HeartbeatAt, Priority, RowVersion, ScheduledAt, WorkerName to DeploymentJobs - Create new indexes for improved query performance - Add constraints to ensure OutputMetadataJson is valid JSON - Record migration in __EFMigrationsHistory
41 lines
1017 B
C#
41 lines
1017 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Microsoft.SelfService.Portal.Core.API.Models
|
|
{
|
|
public class QueueJobTargetModel : BaseModel
|
|
{
|
|
[Column(Order = 1)]
|
|
public Guid QueueJobId { get; set; }
|
|
|
|
[Column(Order = 2)]
|
|
public Guid TargetId { get; set; }
|
|
|
|
[Column(Order = 3)]
|
|
public Guid DeploymentGroupId { get; set; }
|
|
|
|
[Column(Order = 4)]
|
|
public Guid TemplateId { get; set; }
|
|
|
|
[Column(Order = 5)]
|
|
public string Status { get; set; } = QueueJobStatus.Pending;
|
|
|
|
[Column(Order = 6)]
|
|
public int Attempts { get; set; }
|
|
|
|
[Column(Order = 7)]
|
|
public string? ErrorMessage { get; set; }
|
|
|
|
[Column(Order = 8)]
|
|
public DateTime? Started { get; set; }
|
|
|
|
[Column(Order = 9)]
|
|
public DateTime? Finished { get; set; }
|
|
|
|
[Column(Order = 10)]
|
|
public string? OutputMetadataJson { get; set; }
|
|
|
|
public QueueJobModel QueueJob { get; set; }
|
|
}
|
|
}
|
|
|