IF NOT EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'IsProductCertificateMailed'
    WHERE SysObjects.Name = 'ProductCertificate'
)
  ALTER TABLE ProductCertificate ADD IsProductCertificateMailed BIT NULL 
GO
UPDATE ProductCertificate SET IsProductCertificateMailed = 1 WHERE IsProductCertificateMailed IS NULL

IF NOT EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'IsProductCertificateMailedDate'
    WHERE SysObjects.Name = 'ProductCertificate'
)
  ALTER TABLE ProductCertificate ADD IsProductCertificateMailedDate DATETIME NULL 
GO
UPDATE ProductCertificate SET IsProductCertificateMailedDate = GETDATE() WHERE IsProductCertificateMailedDate IS NULL
