
IF (NOT EXISTS 
	(SELECT * FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_NAME = 'pal_SurfaceDrawing'))
BEGIN

	CREATE TABLE [dbo].[pal_SurfaceDrawing](
	[recId] [int] IDENTITY(1,1) NOT NULL,
	[itemId] [int] NULL,
	[fieldId] [int] NULL,	
	[drawingFile] [varchar](max) NULL,
	[drawingDate] [datetime] NULL,	
	[isActive] [bit] NULL,
	 CONSTRAINT [PK_pal_SurfaceDrawing] PRIMARY KEY CLUSTERED 
	(
		[recId] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
	
END


IF (NOT EXISTS 
	(SELECT * FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_NAME = 'pal_SurfaceDrawingConfig'))
BEGIN

	CREATE TABLE [dbo].[pal_SurfaceDrawingConfig](
	[recId] [INT] IDENTITY(1,1) NOT NULL,
	[fieldId] [INT] NULL,
	[placeholder] [VARCHAR](200) NULL,
	[placeHolderW] [VARCHAR](50) NULL,
	[placeHolderH] [VARCHAR](50) NULL,
	[editRoles] [VARCHAR](200) NULL,
	 CONSTRAINT [PK_pal_SurfaceDrawingConfig] PRIMARY KEY CLUSTERED 
	(
		[recId] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY] 
	

END





