IF COL_LENGTH('CD_Controladores', 'Intelek_IP') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_IP	VARCHAR(15)
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_NroNodo') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_NroNodo TINYINT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Puerto_Host') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Puerto_Host INT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Timeout_Envio') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Timeout_Envio INT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Timeout_Recepcion') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Timeout_Recepcion INT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Timeout_EnvioKA') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Timeout_EnvioKA INT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Cant_ReintKA') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Cant_ReintKA SMALLINT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Cred_Tipo') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Cred_Tipo VARCHAR(2)
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Flag_Ent_Huella') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Flag_Ent_Huella TINYINT
END
GO

IF COL_LENGTH('CD_Controladores', 'Intelek_Flag_Sal_Huella') IS NULL
BEGIN
	ALTER TABLE CD_Controladores ADD Intelek_Flag_Sal_Huella TINYINT
END
GO

IF COL_LENGTH('CD_Accesos', 'Flag_Valida_API_Externa') IS NULL
BEGIN
	ALTER TABLE CD_Accesos ADD Flag_Valida_API_Externa TINYINT
END
GO

IF COL_LENGTH('CD_Accesos', 'API_Externa_Tipo') IS NULL
BEGIN
	ALTER TABLE CD_Accesos ADD API_Externa_Tipo CHAR(1)
END
GO
