CREATE TABLE [dbo].[ShTrackingConfigAttributes]
(
[ShTrackingConfigAttributeID] [int] NOT NULL IDENTITY(1, 1),
[ShTrackingConfigEntryTypeID] [int] NOT NULL,
[ShAttributeID] [int] NOT NULL,
[DefaultValue] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Hidden] [bit] NOT NULL CONSTRAINT [DF_ShTrackingConfigAttributes_Hidden] DEFAULT ((0)),
[Required] [bit] NOT NULL CONSTRAINT [DF_ShTrackingConfigAttributes_Required] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ShTrackingConfigAttributes] ADD CONSTRAINT [PK_ShTrackingConfigAttributes] PRIMARY KEY CLUSTERED ([ShTrackingConfigAttributeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ShTrackingConfigAttributes] ADD CONSTRAINT [FK_ShTrackingConfigAttributes_ShAttributeID_ShAttributes] FOREIGN KEY ([ShAttributeID]) REFERENCES [dbo].[ShAttributes] ([ShAttributeID])
GO
ALTER TABLE [dbo].[ShTrackingConfigAttributes] ADD CONSTRAINT [FK_ShTrackingConfigAttributes_ShTrackingConfigEntryTypeID_ShTrackingConfigEntryTypes] FOREIGN KEY ([ShTrackingConfigEntryTypeID]) REFERENCES [dbo].[ShTrackingConfigEntryTypes] ([ShTrackingConfigEntryTypeID])
GO