IF COL_LENGTH('[dbo].[resempco]', 'tiporesidencia') IS NULL
BEGIN
  ALTER TABLE [dbo].[resempco] ADD tiporesidencia NUMERIC(1,0) NULL;
END

IF COL_LENGTH('[dbo].[resempco]', 'obs') IS NULL
BEGIN
  ALTER TABLE [dbo].[resempco] ADD obs VARCHAR(MAX) NULL;
END

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

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

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

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