
IF NOT EXISTS
(
    SELECT *
    FROM SYS.COLUMNS
    WHERE OBJECT_ID = OBJECT_ID('WEB_CONV_DEMITE')
          AND NAME = 'CD_USU'
)
    BEGIN
        ALTER TABLE WEB_CONV_DEMITE
        ADD CD_USU INT NULL;
END;
IF NOT EXISTS
(
    SELECT *
    FROM SYS.COLUMNS
    WHERE OBJECT_ID = OBJECT_ID('WEB_CONV_DEMITE')
          AND NAME = 'CD_CLI'
)
    BEGIN
        ALTER TABLE WEB_CONV_DEMITE
        ADD CD_CLI INT NULL;
END;
IF NOT EXISTS
(
    SELECT *
    FROM SYS.COLUMNS
    WHERE OBJECT_ID = OBJECT_ID('WEB_CONV_DEMITE_RC_CLI')
          AND NAME = 'DT_READMISSAO'
)
    BEGIN
        ALTER TABLE WEB_CONV_DEMITE_RC_CLI
        ADD DT_READMISSAO DATE NULL;
END; 