IF NOT EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'ChangeDate'
    WHERE SysObjects.Name = 'IdentityFields'
)
  ALTER TABLE IdentityFields ADD ChangeDate SMALLDATETIME NULL 
GO

UPDATE IdentityFields SET ChangeDate = GETDATE() WHERE ChangeDate IS NULL

IF EXISTS (SELECT name FROM SysIndexes(NOLOCK) WHERE name = 'PK_IdentityFields')
  ALTER TABLE IdentityFields DROP CONSTRAINT PK_IdentityFields
   
ALTER TABLE IdentityFields ALTER COLUMN ChangeDate SMALLDATETIME NOT NULL
GO