USE @DBNAME 

IF NOT EXISTS (SELECT  * FROM syscolumns WHERE  name = 'Type' AND id = object_Id(N'RepGen_Report')) 
ALTER TABLE RepGen_Report ADD Type int NULL 

IF NOT EXISTS (SELECT  * FROM syscolumns WHERE  name = 'AssignDateTime' AND id = object_Id(N'RepGen_Report')) 
ALTER TABLE RepGen_Report ADD AssignDateTime DateTime NULL 
 
 