USE [MediaLibrary] GO /****** Object: Table [dbo].[RoleAllocation] Script Date: 14/12/2018 00:20:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[RoleAllocation]( [RoleAllocationID] [int] IDENTITY(1,1) NOT NULL, [UserID] [int] NOT NULL, [RoleID] [int] NOT NULL, PRIMARY KEY CLUSTERED ( [RoleAllocationID] 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].[RoleAllocation] WITH CHECK ADD FOREIGN KEY([RoleID]) REFERENCES [dbo].[Roles] ([RoleID]) GO ALTER TABLE [dbo].[RoleAllocation] WITH CHECK ADD FOREIGN KEY([UserID]) REFERENCES [dbo].[Users] ([UserID]) GO