if  Exists(SELECT * FROM sys.tables Where Name = 'AllotmentHotelNote')
BEGIN
	IF NOT EXISTS
	(
	  SELECT SysColumns.Name 
	  FROM SysObjects WITH (NOLOCK) 
		INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
		AND SysColumns.Name = 'DateStamp'
		WHERE SysObjects.Name = 'AllotmentHotelNote'
	)
	BEGIN
		ALTER TABLE AllotmentHotelNote
		DROP CONSTRAINT PK_AllotmentHotelNoteXTAB

		ALTER TABLE AllotmentHotelNote ADD DateStamp DATETIME NOT NULL DEFAULT 0

		ALTER TABLE AllotmentHotelNote ADD CONSTRAINT [PK_AllotmentHotelNoteXTAB] PRIMARY KEY (
		[FK_AllotmentNumber] ASC,
		[FK_HotelCustomerNumber] ASC,
		[DateStamp] ASC
	  )
	END
END
