IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='INTEGRA_ECOMMERCE_SITE_CONFIG')
BEGIN
CREATE TABLE [dbo].[INTEGRA_ECOMMERCE_SITE_CONFIG](
	[SITE_ID] [int] NOT NULL,
	[CHAVE] [varchar](255) NOT NULL,
	[VALOR] [varchar](255) NOT NULL,
 CONSTRAINT [UK_INTEGRA_ECOMMERCE_SITE_CONFIG] UNIQUE NONCLUSTERED 
(
	[SITE_ID] ASC,
	[CHAVE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY];

ALTER TABLE [dbo].[INTEGRA_ECOMMERCE_SITE_CONFIG]  WITH CHECK ADD FOREIGN KEY([SITE_ID])
REFERENCES [dbo].[INTEGRA_ECOMMERCE_SITE] ([ID])
END


