USE [HelpDesk01_Dat]
GO

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tblApprovals')
BEGIN
CREATE TABLE [dbo].[tblApprovals](
	[nID] [int] NOT NULL,
	[nRevisionNumber] [int] NULL,
	[Voters_ID1] [nvarchar](max) NULL,
	[Voters_ID2] [nvarchar](max) NULL,
	[Voters_ID3] [nvarchar](max) NULL,
	[Votes_1_ID1] [nvarchar](max) NULL,
	[Votes_1_ID2] [nvarchar](max) NULL,
	[Votes_1_ID3] [nvarchar](max) NULL,
	[Votes_2_ID1] [nvarchar](max) NULL,
	[Votes_2_ID2] [nvarchar](max) NULL,
	[Votes_2_ID3] [nvarchar](max) NULL,
	[Vote] [int] NULL,
	[Approval_Comments] [nvarchar](max) NULL,
	[Approval_Comments_Log] [nvarchar](max) NULL,
	[Approval_Question] [nvarchar](255) NULL,
	[Minimum_Voters] [int] NULL,
	[Approval_Needed_By_Level_1] [datetime] NULL,
	[Approval_Needed_By_Level_2] [datetime] NULL,
	[Approval_Needed_By_Level_3] [datetime] NULL,
	[No_Approval_Needed_Level_1] [nvarchar](max) NULL,
	[No_Approval_Needed_Level_2] [nvarchar](max) NULL,
	[No_Approval_Needed_Level_3] [nvarchar](max) NULL

 CONSTRAINT [PK_tblApprovals] PRIMARY KEY NONCLUSTERED 
(
	[nID] 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
