Appearance
dbo.primeStatusHistories_Job
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeStatusHistories_Job.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | Type | nvarchar(50) | no | Category/type classification of this record | |
| 2 | Id | uniqueidentifier | no | Primary key / unique identifier for this record | |
| 3 | JobId | uniqueidentifier | no | Foreign key to primeJobs | |
| 4 | ObjectType | nvarchar(50) | no | Type of the related object this record applies to (e.g. Job, Contact) | |
| 5 | ObjectId | uniqueidentifier | no | Identifier of the related object this record applies to | |
| 6 | OldStatusId | uniqueidentifier | yes | Foreign key to primeStatuses - the status being transitioned from | |
| 7 | NewStatusId | uniqueidentifier | no | Foreign key to primeStatuses - the status being transitioned to | |
| 8 | OldStatus | nvarchar(200) | yes | Name of the status being transitioned from | |
| 9 | NewStatus | nvarchar(200) | no | Name of the status being transitioned to | |
| 10 | CreatedAt | datetime | no | Timestamp the record was created | |
| 11 | CreatedBy | nvarchar(100) | yes | User/system that created the record | |
| 12 | Version | bigint | no | Optimistic-concurrency row version number |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| nci_msft_1_primeStatusHistories_Job_BEA188AFE3D4CB59A8ABB4B05F1AD322 | NONCLUSTERED | Id | ||||
| nci_msft_1_primeStatusHistories_Job_E7FA8F6957723E1BBFB8F44279441C92 | NONCLUSTERED | JobId | ||||
| IX_primeStatusHistories_Job_JobId_CreatedAt | NONCLUSTERED | JobId, CreatedAt | NewStatus, OldStatus | |||
| IX_primeStatusHistories_Job_Accepted_FirstByJob | NONCLUSTERED | JobId, CreatedAt | NewStatus | ([NewStatus] IN ('Quote Authorised - Awaiting Excess/Owner Acceptance', 'Restoration Component Authorised')) | ||
| nci_msft_1_primeStatusHistories_Job_4DE6CA7C9D51F7C1497F194082C58E2F | NONCLUSTERED | NewStatus | CreatedAt, JobId |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.primeStatusHistories_Job.JobId | dbo.primeJobs.Id | high |
| dbo.primeStatusHistories_Job.JobId | dbo.primeEstimates.jobId | medium |
| dbo.primeStatusHistories_Job.NewStatusId | dbo.primeStatuses.id | medium |
| dbo.wipTextInstructions.jobStatus | dbo.primeStatusHistories_Job.NewStatus | medium |
Referenced by
Views: dbo.vprimeEstimatorQuoteConversions, dbo.VPrimeEstimatorstagesEstimatorworkflowdb, dbo.vprimefirstquote, dbo.vprimeJobflowsankeyObjectivedb, dbo.vprimejobsthismonthObjectivedb, dbo.VPrimeTimetobuildObjectivedb, dbo.VPrimeTimetoquoteObjectivedb
Procedures: dbo.spEthGetQueuedIDs, dbo.spEthKpiSummarybyJobId, dbo.spEthPopulatePeerReviewStatus, dbo.spEthQueueMissingJobs, dbo.spEthQueueMissingKpis, dbo.spEthQueueMissingStatusHistoriesJob, dbo.spEthSyncQueueMissingObjects, dbo.spEthSyncQueueMissingObjectsByJobID, dbo.spPrimeGetJobsLocationTaskQueue, dbo.spPrimeGetStatusHistory_JobNextDates, dbo.spPrimeUpsertStatusHistory_Job, dbo.spRefreshEstimatorStageSummary

