From 5811d878180a85af5c41b9cb3b8f272d589539e9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 17 Dec 2020 11:21:14 +0200 Subject: Roles are now in a seperate table, user can contain multiple roles (BUT JWT doesn't support mutiple yet), added migrations, userrepository returns user roles with the user --- src/DevHive.Data/Repositories/DevHiveContext.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/DevHive.Data/Repositories/DevHiveContext.cs') diff --git a/src/DevHive.Data/Repositories/DevHiveContext.cs b/src/DevHive.Data/Repositories/DevHiveContext.cs index 2f0fa55..373eb5e 100644 --- a/src/DevHive.Data/Repositories/DevHiveContext.cs +++ b/src/DevHive.Data/Repositories/DevHiveContext.cs @@ -18,6 +18,10 @@ namespace DevHive.Data.Repositories builder.Entity() .HasIndex(x => x.UserName) .IsUnique(); + + builder.Entity() + .HasIndex(x => x.Id) + .IsUnique(); base.OnModelCreating(builder); } -- cgit v1.2.3