
/*------ ATD 450526 ------*/
IF not EXISTS (SELECT 1 FROM DADOADICIONAL WHERE OID = 41125 )
insert into dadoadicional ( RCLASSECONCRETA,RAPLICATIVO,RDOMINIO,RLISTA,RTIPO,RITEM,RESTRICAO,VISIVEL,MASCARA,PADRAO,MAXIMO,MINIMO,VALOR,OID,DESCRICAOEXTRA,INFORMACAOMU) values (7,7,7,7,1015,2121,0,0,'99/99/9999','',1,0,'Data de validade da assinatura cliente prime',41125,'Data de validade da assinatura cliente prime (dd/mm/aaaa)','PA 450526 ')
go


if exists(select 1 from INFORMATION_SCHEMA.TABLES a where a.TABLE_NAME = 'itemclicomplemento')
    and not exists(select 1 from INFORMATION_SCHEMA.COLUMNS a where a.TABLE_NAME = 'itemclicomplemento' and a.COLUMN_NAME ='NumeroCupom')
begin
    alter table itemclicomplemento add NumeroCupom varchar(50) null
end 

if exists(select 1 from INFORMATION_SCHEMA.TABLES a where a.TABLE_NAME = 'itemclicomplemento')
    and not exists(select 1 from INFORMATION_SCHEMA.COLUMNS a where a.TABLE_NAME = 'itemclicomplemento' and a.COLUMN_NAME ='TipoVenda')
begin
    alter table itemclicomplemento add TipoVenda varchar(50) null
end 


if exists(select 1 from INFORMATION_SCHEMA.TABLES a where a.TABLE_NAME = 'itemclicomplemento')
    and not exists(select 1 from INFORMATION_SCHEMA.COLUMNS a where a.TABLE_NAME = 'itemclicomplemento' and a.COLUMN_NAME ='TipoCupom')
begin
    alter table itemclicomplemento add TipoCupom varchar(50) null
end