[dbo].[InternationalCustomsInspectionInformation]
CREATE TABLE [dbo].[InternationalCustomsInspectionInformation]
(
[InternationalCustomsInspectionInformationID] [int] NOT NULL IDENTITY(1, 1),
[OrdersFID] [int] NOT NULL,
[InternationalCustomsInspectionLocationFID] [int] NULL,
[InternationalCustomsInspectionTypeFID] [int] NULL,
[Results] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Notes] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Name] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LocationCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsDeleted] [bit] NOT NULL CONSTRAINT [DF_InternationalCustomsInspectionInformation_IsDeleted] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsInspectionInformation] ADD CONSTRAINT [PK_InternationalCustomsInspectionInformation] PRIMARY KEY NONCLUSTERED ([InternationalCustomsInspectionInformationID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_InternationalCustomsInspectionInformation_OrdersFID] ON [dbo].[InternationalCustomsInspectionInformation] ([OrdersFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsInspectionInformation] ADD CONSTRAINT [FK_InternationalCustomsInspectionInformation_InternationalCustomsInspectionLocation] FOREIGN KEY ([InternationalCustomsInspectionLocationFID]) REFERENCES [dbo].[InternationalCustomsInspectionLocation] ([InternationalCustomsInspectionLocationID])
GO
ALTER TABLE [dbo].[InternationalCustomsInspectionInformation] ADD CONSTRAINT [FK_InternationalCustomsInspectionInformation_InternationalCustomsInspectionType] FOREIGN KEY ([InternationalCustomsInspectionTypeFID]) REFERENCES [dbo].[InternationalCustomsInspectionType] ([InternationalCustomsInspectionTypeID])
GO
ALTER TABLE [dbo].[InternationalCustomsInspectionInformation] ADD CONSTRAINT [FK_InternationalCustomsInspectionInformation_Orders] FOREIGN KEY ([OrdersFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON [dbo].[InternationalCustomsInspectionInformation] TO [MssExec]
GRANT INSERT ON [dbo].[InternationalCustomsInspectionInformation] TO [MssExec]
GRANT DELETE ON [dbo].[InternationalCustomsInspectionInformation] TO [MssExec]
GRANT UPDATE ON [dbo].[InternationalCustomsInspectionInformation] TO [MssExec]
GO