IF EXISTS(
    SELECT * FROM sys.columns 
    WHERE Name = N'StatusLastChangedOld' AND Object_ID = Object_ID(N'BA_Site'))
BEGIN
		UPDATE a SET a.StatusLastChanged = cast(b.StatusLastChangedOld as datetimeoffset(7))
		FROM BA_Site a INNER JOIN BA_Site b ON a.Id = b.Id

		ALTER TABLE [dbo].BA_Site DROP COLUMN StatusLastChangedOld
END;