IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'syn_puntoIntegracionTabla')
BEGIN
	EXEC [dbo].[_ini_creartabla] 'syn_puntoIntegracionTabla', 1
END
GO

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'syn_puntoIntegracionTabla' AND COLUMN_NAME = 'id_puntoIntegracion')
BEGIN
	ALTER TABLE [syn_puntoIntegracionTabla]
	ADD [id_puntoIntegracion] INT NOT NULL
	DEFAULT 0
	FOREIGN KEY ([id_puntoIntegracion]) REFERENCES [syn_puntoIntegracion](id)
END
GO

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'syn_puntoIntegracionTabla' AND COLUMN_NAME = 'tabla')
BEGIN
	ALTER TABLE [syn_puntoIntegracionTabla]
	ADD [tabla] VARCHAR(200) NOT NULL
	DEFAULT ''
END
GO
