IF (NOT EXISTS 
	(SELECT * FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_NAME = 'pal_FileExplorerConfig'))
BEGIN
	
	CREATE TABLE [dbo].[pal_FileExplorerConfig](
		[recId] [int] IDENTITY(1,1) NOT NULL,
		[roleView] [int] NULL,
		[roleAdd] [int] NULL,
		[roleDelete] [int] NULL,
		[canvasId] [int] NULL,
		[maxFileSize] [int] NULL,
		[allowPaging] [bit] NULL,
		[pageSize] [int] NULL,
	 CONSTRAINT [PK_pal_FileExplorerConfig] 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


IF (NOT EXISTS 
	(SELECT * FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_NAME = 'pal_FileExplorerMetaData'))
BEGIN
	CREATE TABLE [dbo].[pal_FileExplorerMetaData](
		[recId] [int] IDENTITY(1,1) NOT NULL,
		[canvasId] [int] NULL,
		[explorerType] [int] NULL,
		[date] [datetime] NULL,
		[fileType] [varchar](50) NULL,
		[fileSize] [varchar](450) NULL,
		[path] [varchar](MAX) NULL,
		[name] [varchar](350) NULL,
		[uploadedBy] [varchar](450) NULL,
		CONSTRAINT [PK_pal_FileExplorerMetaData] 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