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

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

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

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

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

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

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

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

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