Tables [dbo].[ShipmentStatusHistory]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created3:42:52 PM Tuesday, May 8, 2012
Last Modified4:03:00 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_ShipmentStatusHistory: ShipmentStatusHistoryIDIndexes IX_ShipmentStatusHistory_OrderFID_ShipmentStatusHistoryID: OrderFID\ShipmentStatusHistoryIDShipmentStatusHistoryIDint4
No
1 - 1
Foreign Keys FK_ShipmentStatusHistory_Orders: [dbo].[Orders].OrderFIDIndexes IX_ShipmentStatusHistory_OrderFID_ShipmentStatusHistoryID: OrderFID\ShipmentStatusHistoryIDOrderFIDint4
No
DateTimedatetime8
No
Foreign Keys FK_ShipmentStatusHistory_ShipmentStatus: [dbo].[ShipmentStatus].ShipmentStatusFIDShipmentStatusFIDint4
No
Foreign Keys FK_ShipmentStatusHistory_Sysuser: [dbo].[Sysuser].ChangedBySysuserFIDIndexes IX_ShipmentStatusHistory_ChangedBySysuserFID: ChangedBySysuserFIDChangedBySysuserFIDint4
No
Descriptionvarchar(256)256
Yes
VanNovarchar(12)12
Yes
DriverIDvarchar(15)15
Yes
DriverNamevarchar(50)50
Yes
DriverCellPhone[dbo].[PhoneCombined]30
Yes
VanlineUserInitialsvarchar(4)4
Yes
KeyDatedatetime8
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_ShipmentStatusHistory: ShipmentStatusHistoryIDPK_ShipmentStatusHistoryShipmentStatusHistoryID
Yes
IX_ShipmentStatusHistory_ChangedBySysuserFIDChangedBySysuserFID
IX_ShipmentStatusHistory_OrderFID_ShipmentStatusHistoryIDOrderFID, ShipmentStatusHistoryID
Foreign Keys Foreign Keys
NameColumns
FK_ShipmentStatusHistory_SysuserChangedBySysuserFID->[dbo].[Sysuser].[SysUserID]
FK_ShipmentStatusHistory_OrdersOrderFID->[dbo].[Orders].[PriKey]
FK_ShipmentStatusHistory_ShipmentStatusShipmentStatusFID->[dbo].[ShipmentStatus].[ShipmentStatusID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
Extended Properties
NameLevel 2 TypeLevel 2 NameValue
DescriptionHolds a history of changes to vanline shipment status for a particular order.
DescriptionCOLUMNChangedBySysuserFIDForeign key to a moverssuite user that changed the vanline shipment status.
DescriptionCOLUMNDateTimeDate and time that a status update occurred.
DescriptionCOLUMNDescriptionDescription of a change to vanline shipment status.
DescriptionCOLUMNDriverCellPhoneCell phone of a driver associated to a dispatch.
DescriptionCOLUMNDriverIDID of a driver associated to a dispatch.
DescriptionCOLUMNDriverNameName of a driver associated to a dispatch.
DescriptionCOLUMNKeyDateKey date generated from shipment status activity.
DescriptionCOLUMNOrderFIDForeign key to an order.
DescriptionCOLUMNShipmentStatusFIDForeign key to a vanline shipment status.
DescriptionCOLUMNShipmentStatusHistoryIDPrimary key of the ShipmentStatusHistory table.
DescriptionCOLUMNVanNoVan number associated to a dispatch.
SQL Script
CREATE TABLE [dbo].[ShipmentStatusHistory]
(
[ShipmentStatusHistoryID] [int] NOT NULL IDENTITY(1, 1),
[OrderFID] [int] NOT NULL,
[DateTime] [datetime] NOT NULL,
[ShipmentStatusFID] [int] NOT NULL,
[ChangedBySysuserFID] [int] NOT NULL,
[Description] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VanNo] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DriverID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DriverName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DriverCellPhone] [dbo].[PhoneCombined] NULL,
[VanlineUserInitials] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[KeyDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ShipmentStatusHistory] ADD CONSTRAINT [PK_ShipmentStatusHistory] PRIMARY KEY NONCLUSTERED  ([ShipmentStatusHistoryID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ShipmentStatusHistory_ChangedBySysuserFID] ON [dbo].[ShipmentStatusHistory] ([ChangedBySysuserFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ShipmentStatusHistory_OrderFID_ShipmentStatusHistoryID] ON [dbo].[ShipmentStatusHistory] ([OrderFID], [ShipmentStatusHistoryID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ShipmentStatusHistory] ADD CONSTRAINT [FK_ShipmentStatusHistory_Sysuser] FOREIGN KEY ([ChangedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[ShipmentStatusHistory] ADD CONSTRAINT [FK_ShipmentStatusHistory_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[ShipmentStatusHistory] ADD CONSTRAINT [FK_ShipmentStatusHistory_ShipmentStatus] FOREIGN KEY ([ShipmentStatusFID]) REFERENCES [dbo].[ShipmentStatus] ([ShipmentStatusID])
GO
GRANT SELECT ON  [dbo].[ShipmentStatusHistory] TO [MssExec]
GRANT INSERT ON  [dbo].[ShipmentStatusHistory] TO [MssExec]
GRANT DELETE ON  [dbo].[ShipmentStatusHistory] TO [MssExec]
GRANT UPDATE ON  [dbo].[ShipmentStatusHistory] TO [MssExec]
GO
EXEC sp_addextendedproperty N'Description', N'Holds a history of changes to vanline shipment status for a particular order.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', NULL, NULL
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to a moverssuite user that changed the vanline shipment status.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'ChangedBySysuserFID'
GO
EXEC sp_addextendedproperty N'Description', N'Date and time that a status update occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'DateTime'
GO
EXEC sp_addextendedproperty N'Description', N'Description of a change to vanline shipment status.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'Description'
GO
EXEC sp_addextendedproperty N'Description', N'Cell phone of a driver associated to a dispatch.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'DriverCellPhone'
GO
EXEC sp_addextendedproperty N'Description', N'ID of a driver associated to a dispatch.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'DriverID'
GO
EXEC sp_addextendedproperty N'Description', N'Name of a driver associated to a dispatch.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'DriverName'
GO
EXEC sp_addextendedproperty N'Description', N'Key date generated from shipment status activity.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'KeyDate'
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to an order.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'OrderFID'
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to a vanline shipment status.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'ShipmentStatusFID'
GO
EXEC sp_addextendedproperty N'Description', N'Primary key of the ShipmentStatusHistory table.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'ShipmentStatusHistoryID'
GO
EXEC sp_addextendedproperty N'Description', N'Van number associated to a dispatch.', 'SCHEMA', N'dbo', 'TABLE', N'ShipmentStatusHistory', 'COLUMN', N'VanNo'
GO
Uses