if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_nivelTax' and column_name = 'id_nivelTax')
begin
alter table [tax_nivelTax] add [id_nivelTax] int NOT NULL DEFAULT 0
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_nivelTax' and column_name = 'tabla')
begin
alter table [tax_nivelTax] add [tabla] varchar(300) NOT NULL DEFAULT ''
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_nivelTax' and column_name = 'filtro')
begin
alter table [tax_nivelTax] add [filtro] varchar(300) NOT NULL DEFAULT ''
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_nivelTax' and column_name = 'columnaPrincipal')
begin
alter table [tax_nivelTax] add [columnaPrincipal] varchar(300) NOT NULL DEFAULT ''
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_objetoTax' and column_name = 'tabla')
begin
alter table [tax_objetoTax] add [tabla] varchar(300) NOT NULL DEFAULT ''
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_objetoTax' and column_name = 'id_tablaTax')
begin
alter table [tax_objetoTax] add [id_tablaTax] int NOT NULL DEFAULT 0
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_objetoTax' and column_name = 'id_objTax')
begin
alter table [tax_objetoTax] add [id_objTax] int NOT NULL DEFAULT 0
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_objetoTax' and column_name = 'id_nivelTax')
begin
alter table [tax_objetoTax] add [id_nivelTax] int NOT NULL DEFAULT 0
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_objetoTax' and column_name = 'orden')
begin
alter table [tax_objetoTax] add [orden] int NOT NULL DEFAULT 0
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='tax_nivelTax' and column_name = 'esEquipo')
begin
alter table [tax_nivelTax] add [esEquipo] bit NOT NULL DEFAULT 0
end
go

if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='cat_sistema' and column_name = 'id_sistema')
begin
alter table [cat_sistema] add [id_sistema] int NOT NULL DEFAULT 0
end
go
