USE [EnVisage]
GO

CREATE TABLE [dbo].[Team2Project](
	[Id] [uniqueidentifier] NOT NULL,
	[TeamId] [uniqueidentifier] NOT NULL,
	[ProjectId] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Team2Project] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Team2Project]  WITH CHECK ADD  CONSTRAINT [FK_Team2Project_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Project] ([Id])
GO

ALTER TABLE [dbo].[Team2Project] CHECK CONSTRAINT [FK_Team2Project_Project]
GO

ALTER TABLE [dbo].[Team2Project]  WITH CHECK ADD  CONSTRAINT [FK_Team2Project_Team] FOREIGN KEY([TeamId])
REFERENCES [dbo].[Team] ([Id])
GO

ALTER TABLE [dbo].[Team2Project] CHECK CONSTRAINT [FK_Team2Project_Team]
GO


