CREATE TABLE [dbo].[VanLine]
(
[VLPriKey] [int] NOT NULL IDENTITY(1, 1),
[VanLineCode] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VanLineName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VendorNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ImageURL] [varchar] (2048) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOT] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PhoneNumber] [dbo].[PhoneCombined] NULL,
[Extension] [dbo].[PhoneExtension] NULL,
[AuthorityTypeFID] [int] NOT NULL,
[ClaimsCustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanLine] ADD CONSTRAINT [PK_VanLine] PRIMARY KEY CLUSTERED ([VLPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanLine] ADD CONSTRAINT [IX_VanLine_VanLineCode] UNIQUE NONCLUSTERED ([VanLineCode]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanLine_AuthorityType] ON [dbo].[VanLine] ([AuthorityTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanLine] ADD CONSTRAINT [FK_VanLIne_AuthorityType] FOREIGN KEY ([AuthorityTypeFID]) REFERENCES [dbo].[AuthorityTypes] ([AuthPriKey])
GO
GRANT SELECT ON [dbo].[VanLine] TO [MssExec]
GRANT INSERT ON [dbo].[VanLine] TO [MssExec]
GRANT DELETE ON [dbo].[VanLine] TO [MssExec]
GRANT UPDATE ON [dbo].[VanLine] TO [MssExec]
GO