

--Creacion Tabla
if not exists(select * FROM INFORMATION_SCHEMA.TABLES  where Table_Name='cat_tarifaCatalogo')
begin
EXEC _ini_creartabla 'cat_tarifaCatalogo', 1
end

print('-creacion tabla cat_tarifaCatalogo-')

--Creacion Columna

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='cat_tarifaCatalogo' and column_name = 'id_catalogo_elemento' )
begin
alter table [cat_tarifaCatalogo] add [id_catalogo_tarifa] int not null default 0
end

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='cat_tarifaCatalogo' and column_name = 'id_catalogo_elemento' )
begin
alter table [cat_tarifaCatalogo] add [id_catalogo_elemento] int not null default 0
end

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='cat_tarifaCatalogo' and column_name = 'id_tipotarifa' )
begin
alter table [cat_tarifaCatalogo] add [id_tipotarifa] int not null default 0
end

print('-creacion  columnas cat_tarifaCatalogo-')