USE Resources01_Dat
GO

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'Connect_As' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [Connect_As] [nvarchar](255) NULL
END

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'Connect_to_Computer' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [Connect_to_Computer] [int] NULL
END

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'Password' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [Password] [nvarchar](255) NULL
END

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'PCD_HostId' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [PCD_HostId] [nvarchar](255) NULL
END

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'Remote_Control_Gateway' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [Remote_Control_Gateway] [int] NULL
END
	
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'Public_Host_Name' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [Public_Host_Name] [nvarchar](255) NULL
END	

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_NAME = 'tblDts' AND COLUMN_NAME = 'Unauthorized_In_Organization' )
BEGIN
	ALTER TABLE [dbo].[tblDts] ADD [Unauthorized_In_Organization] [int] NULL
END	
	

	
GO

