IF COL_LENGTH('[dbo].[documento]', 'banco') IS NULL
BEGIN
  ALTER TABLE [dbo].[documento] ADD banco VARCHAR(255) NULL;
END
IF COL_LENGTH('[dbo].[documento]', 'idresponsavel') IS NULL
BEGIN
  ALTER TABLE [dbo].[documento] ADD idresponsavel BIGINT NULL;
END
IF COL_LENGTH('[dbo].[documento]', 'recto') IS NULL
BEGIN
  ALTER TABLE [dbo].[documento] ADD recto CHAR(1) NULL;
END
IF COL_LENGTH('[dbo].[documento]', 'final_vig') IS NULL
BEGIN
  ALTER TABLE [dbo].[documento] ADD final_vig CHAR(1) NULL;
END
