USE [Clinica]
GO
/****** Object:  Table [Core].[RolPorPerfil]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Core].[RolPorPerfil](
	[IdRolPorPerfil] [int] IDENTITY(1,1) NOT NULL,
	[IdRol] [int] NULL,
	[IdPerfil] [int] NULL,
 CONSTRAINT [PK_RolPorPerfil] PRIMARY KEY CLUSTERED 
(
	[IdRolPorPerfil] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [Core].[RolPorPerfil]  WITH CHECK ADD  CONSTRAINT [FK_RolPorPerfil_Perfil] FOREIGN KEY([IdPerfil])
REFERENCES [Core].[Perfil] ([IdPerfil])
GO
ALTER TABLE [Core].[RolPorPerfil] CHECK CONSTRAINT [FK_RolPorPerfil_Perfil]
GO
ALTER TABLE [Core].[RolPorPerfil]  WITH CHECK ADD  CONSTRAINT [FK_RolPorPerfil_Rol] FOREIGN KEY([IdRol])
REFERENCES [Core].[Rol] ([IdRol])
GO
ALTER TABLE [Core].[RolPorPerfil] CHECK CONSTRAINT [FK_RolPorPerfil_Rol]
GO
