IF  NOT EXISTS (SELECT * FROM sys.objects 
					WHERE object_id = OBJECT_ID(N'[dbo].[INTEGRA_PACOTES_EVENTOS]') 
					AND type in (N'U')) 
begin
CREATE TABLE [dbo].[INTEGRA_PACOTES_EVENTOS](
	[ID_PACOTE] [uniqueidentifier] NOT NULL,
	[ID_EVENTO] [uniqueidentifier] NOT NULL
) ON [PRIMARY]

ALTER TABLE [dbo].[INTEGRA_PACOTES_EVENTOS]  WITH CHECK ADD FOREIGN KEY([ID_EVENTO])
REFERENCES [dbo].[INTEGRA_EVENTOS] ([ID])

ALTER TABLE [dbo].[INTEGRA_PACOTES_EVENTOS]  WITH CHECK ADD FOREIGN KEY([ID_PACOTE])
REFERENCES [dbo].[INTEGRA_PACOTES] ([ID])
end

