ALTER TABLE Documents DROP COLUMN DocPdf

CREATE TABLE [dbo].[Pdfs](
	[DocID] [int] NOT NULL,
	[DebugStatus] [int] NOT NULL,
	[TopRow] [int] NOT NULL,
	[PageLength] [int] NOT NULL,
	[LeftMargin] [int] NOT NULL,
	[PageWidth] [int] NOT NULL,
	[PageCount] [float] NOT NULL,
	[DTS] [datetime] NOT NULL CONSTRAINT [DF_Pdfs_DTS]  DEFAULT (getdate()),
	[UserID] [nvarchar](100) NOT NULL CONSTRAINT [DF_Pdfs_UserID]  DEFAULT (upper(suser_sname())),
	[LastChanged] [timestamp] NOT NULL,
	[DocPdf] [varbinary](max) NULL,

 CONSTRAINT [PK_Pdfs] PRIMARY KEY CLUSTERED 
(
	[DocID] ASC,
	[DebugStatus] ASC,
	[TopRow] ASC,
	[PageLength] ASC,
	[LeftMargin] ASC,
	[PageWidth] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'> 0 for Debug' , @level0type=N'SCHEMA',@level0name=N'dbo', 
	@level1type=N'TABLE',@level1name=N'Pdfs', @level2type=N'COLUMN',@level2name=N'DebugStatus'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'{datetime}' , @level0type=N'SCHEMA',@level0name=N'dbo', 
	@level1type=N'TABLE',@level1name=N'Pdfs', @level2type=N'COLUMN',@level2name=N'DTS'

GO
ALTER TABLE [dbo].[Pdfs]  WITH CHECK ADD  CONSTRAINT [FK_Pdfs_Documents] FOREIGN KEY([DocID])
REFERENCES [dbo].[Documents] ([DocID])
GO
ALTER TABLE [dbo].[Pdfs] CHECK CONSTRAINT [FK_Pdfs_Documents]
