Tables [dbo].[OrderStatusFieldRequirement]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created3:50:52 PM Thursday, December 6, 2018
Last Modified3:51:07 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_OrderStatusFieldRequirement: OrderStatusFieldRequirementIDOrderStatusFieldRequirementIDint4
No
1 - 1
Foreign Keys FK_OrderStatusFieldRequirement_OrderStatusFieldRequirementMaster: [dbo].[OrderStatusFieldRequirementMaster].OrderStatusFieldRequirementMasterFIDOrderStatusFieldRequirementMasterFIDint4
No
Foreign Keys FK_OrderStatusFieldRequirement_OrderStatus: [dbo].[OrderStatus].OrderStatusFIDIndexes IX_OrderStatusFieldRequirement_OrderStatusFID_ShipmentTypeFID_RequireableFieldFID: OrderStatusFID\ShipmentTypeFID\RequireableFieldFIDOrderStatusFIDint4
No
Foreign Keys FK_OrderStatusFieldRequirement_ShipmentType: [dbo].[ShipmentType].ShipmentTypeFIDIndexes IX_OrderStatusFieldRequirement_OrderStatusFID_ShipmentTypeFID_RequireableFieldFID: OrderStatusFID\ShipmentTypeFID\RequireableFieldFIDShipmentTypeFIDint4
Yes
Foreign Keys FK_OrderStatusFieldRequirement_RequireableField: [dbo].[RequireableField].RequireableFieldFIDIndexes IX_OrderStatusFieldRequirement_OrderStatusFID_ShipmentTypeFID_RequireableFieldFID: OrderStatusFID\ShipmentTypeFID\RequireableFieldFIDRequireableFieldFIDint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_OrderStatusFieldRequirement: OrderStatusFieldRequirementIDPK_OrderStatusFieldRequirementOrderStatusFieldRequirementID
Yes
IX_OrderStatusFieldRequirement_OrderStatusFID_ShipmentTypeFID_RequireableFieldFIDOrderStatusFID, ShipmentTypeFID, RequireableFieldFID
Yes
Foreign Keys Foreign Keys
NameColumns
FK_OrderStatusFieldRequirement_OrderStatusOrderStatusFID->[dbo].[OrderStatus].[PriKey]
FK_OrderStatusFieldRequirement_OrderStatusFieldRequirementMasterOrderStatusFieldRequirementMasterFID->[dbo].[OrderStatusFieldRequirementMaster].[OrderStatusFieldRequirementMasterID]
FK_OrderStatusFieldRequirement_RequireableFieldRequireableFieldFID->[dbo].[RequireableField].[RequireableFieldID]
FK_OrderStatusFieldRequirement_ShipmentTypeShipmentTypeFID->[dbo].[ShipmentType].[ShipmentTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[OrderStatusFieldRequirement]
(
[OrderStatusFieldRequirementID] [int] NOT NULL IDENTITY(1, 1),
[OrderStatusFieldRequirementMasterFID] [int] NOT NULL,
[OrderStatusFID] [int] NOT NULL,
[ShipmentTypeFID] [int] NULL,
[RequireableFieldFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OrderStatusFieldRequirement] ADD CONSTRAINT [PK_OrderStatusFieldRequirement] PRIMARY KEY NONCLUSTERED  ([OrderStatusFieldRequirementID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_OrderStatusFieldRequirement_OrderStatusFID_ShipmentTypeFID_RequireableFieldFID] ON [dbo].[OrderStatusFieldRequirement] ([OrderStatusFID], [ShipmentTypeFID], [RequireableFieldFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OrderStatusFieldRequirement] ADD CONSTRAINT [FK_OrderStatusFieldRequirement_OrderStatus] FOREIGN KEY ([OrderStatusFID]) REFERENCES [dbo].[OrderStatus] ([PriKey])
GO
ALTER TABLE [dbo].[OrderStatusFieldRequirement] ADD CONSTRAINT [FK_OrderStatusFieldRequirement_OrderStatusFieldRequirementMaster] FOREIGN KEY ([OrderStatusFieldRequirementMasterFID]) REFERENCES [dbo].[OrderStatusFieldRequirementMaster] ([OrderStatusFieldRequirementMasterID])
GO
ALTER TABLE [dbo].[OrderStatusFieldRequirement] ADD CONSTRAINT [FK_OrderStatusFieldRequirement_RequireableField] FOREIGN KEY ([RequireableFieldFID]) REFERENCES [dbo].[RequireableField] ([RequireableFieldID])
GO
ALTER TABLE [dbo].[OrderStatusFieldRequirement] ADD CONSTRAINT [FK_OrderStatusFieldRequirement_ShipmentType] FOREIGN KEY ([ShipmentTypeFID]) REFERENCES [dbo].[ShipmentType] ([ShipmentTypeID])
GO
GRANT SELECT ON  [dbo].[OrderStatusFieldRequirement] TO [MssExec]
GRANT INSERT ON  [dbo].[OrderStatusFieldRequirement] TO [MssExec]
GRANT DELETE ON  [dbo].[OrderStatusFieldRequirement] TO [MssExec]
GRANT UPDATE ON  [dbo].[OrderStatusFieldRequirement] TO [MssExec]
GO
Uses