USE [EnVisage]
GO

IF not EXISTS (SELECT * FROM sys.tables where name='Attachments')
begin
CREATE TABLE [dbo].[Attachments](
	[Id] [uniqueidentifier] NOT NULL,
	[ParentId] [uniqueidentifier] NOT NULL,
	[ParentType] [nvarchar](500) NOT NULL,
	[SourceFileName] [nvarchar](500) NOT NULL,
	[FileName] [nvarchar](1000) NOT NULL,
	[ContentType] [nvarchar](100) NULL,
	[FileSize] [int] NULL,
	[Created] [datetime] NULL,
 CONSTRAINT [PK_Attachments] PRIMARY KEY CLUSTERED 
(
	[Id] 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
GO

