



--DIS_EVENTO
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='dis_evento' and column_name = 'codigo' )
begin
alter table [dis_evento] add [codigo] varchar(100) NULL DEFAULT ''
end


--PARA PERFIL 
IF NOT EXISTS(SELECT *FROM [_columnas] WHERE[tabla]='dis_evento'
      AND [columna]='codigo'AND[mostrarEnGrilla]=1 AND[ordenGrilla]=5AND[requerido]=1 AND[tipo]='varchar'AND[defecto]='' AND [tamano] =100)
BEGIN
INSERT INTO [_columnas]
([tabla] ,[columna] ,[mostrarEnGrilla],[ordenGrilla],[requerido] ,[tipo],[defecto],[tamano])
 VALUES
 ('dis_evento' ,'codigo',1 ,5 ,1 ,'varchar' ,'' ,100)
END












   
