/*
	dbo.quotes_QuoteItemsPriceCheck will be created if it doesn't exist already
*/

IF OBJECT_ID('dbo.quotes_QuoteItemsPriceCheck', 'U') IS not NULL 
BEGIN
	SET NOEXEC ON;
END

CREATE TABLE [dbo].[quotes_QuoteItemsPriceCheck](
	[QuoteItemId] [int] NOT NULL,
	[CheckDate] [datetime2](7) NOT NULL,
	[QuoteNumber] [varchar](50) NULL,
	[QuoteDate] [datetime] NULL,
	[OldSellPrice] [money] NULL,
	[NewSellPrice] [money] NULL,
	[ReferenceQuoteItemId] [int] NULL,
	[CatListCostPrice] [money] NULL,
 CONSTRAINT [PK_QuoteItemsPriceCheck] PRIMARY KEY CLUSTERED 
(
	[QuoteItemId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[quotes_QuoteItemsPriceCheck] ADD  CONSTRAINT [DF_QuoteItemsPriceCheck_CheckDate]  DEFAULT (getdate()) FOR [CheckDate]
GO

SET NOEXEC OFF;