CREATE TABLE [dbo].[VanlineGroup]
(
[VanlineGroupID] [int] NOT NULL IDENTITY(1, 1),
[VanlineGroupName] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VanlineExternalCode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[XmlSystemDataTypeMapFID] [int] NULL,
[InactivateItemCodeMappings] [bit] NOT NULL CONSTRAINT [DF_VanlineGroup_InactivateItemCodeMappings] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineGroup] ADD CONSTRAINT [PK_VanlineGroup] PRIMARY KEY CLUSTERED ([VanlineGroupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineGroup] ADD CONSTRAINT [IX_VanlineGroup_VanlineExternalCode] UNIQUE NONCLUSTERED ([VanlineExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineGroup] ADD CONSTRAINT [IX_VanlineGroup_VanlineGroupName] UNIQUE NONCLUSTERED ([VanlineGroupName]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineGroup_XmlSystemDataTypeMapFID] ON [dbo].[VanlineGroup] ([XmlSystemDataTypeMapFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineGroup] ADD CONSTRAINT [FK_VanlineGroup_XmlSystemDataTypeMap] FOREIGN KEY ([XmlSystemDataTypeMapFID]) REFERENCES [dbo].[XmlSystemDataTypeMap] ([XmlSystemDataTypeMapID])
GO
GRANT SELECT ON [dbo].[VanlineGroup] TO [MssExec]
GRANT INSERT ON [dbo].[VanlineGroup] TO [MssExec]
GRANT DELETE ON [dbo].[VanlineGroup] TO [MssExec]
GRANT UPDATE ON [dbo].[VanlineGroup] TO [MssExec]
GO