IF COL_LENGTH('[dbo].[newarquivodigital]', 'datacriacao') IS NULL
BEGIN
  ALTER TABLE [dbo].[newarquivodigital] ADD datacriacao DATETIME2 NULL;
END

IF COL_LENGTH('[dbo].[newarquivodigital]', 'usuariocriacao') IS NULL
BEGIN
  ALTER TABLE [dbo].[newarquivodigital] ADD usuariocriacao BIGINT NULL;
END

IF COL_LENGTH('[dbo].[newarquivodigital]', 'dataalteracao') IS NULL
BEGIN
  ALTER TABLE [dbo].[newarquivodigital] ADD dataalteracao DATETIME2 NULL;
END

IF COL_LENGTH('[dbo].[newarquivodigital]', 'usuarioalteracao') IS NULL
BEGIN
  ALTER TABLE [dbo].[newarquivodigital] ADD usuarioalteracao BIGINT NULL;
END
