IF ( select count(sc.table_id) from sys.syscolumn as sc == sys.systable as st
  where LCase(st.table_name)= LCase('PayTypes') and LCase(sc.column_name)= LCase('CreateDate') ) = 0 then
alter table PayTypes
  add "CreateDate" timestamp
end if;

GO

Update PayTypes set CreateDate = (select min(LastChanged) from PayTypes);
  
GO

IF (EXISTS(Select * from sys.systrigger where LCase(trigger_name) = LCase('Trig_PayTypes_CreateDate')))
THEN Drop trigger Trig_PayTypes_CreateDate
END IF

GO

create trigger Trig_PayTypes_CreateDate before insert order 2 on
DBA.PayTypes
referencing new as new_
for each row
when(new_.CreateDate is null)
begin
  set new_.CreateDate = current timestamp
end