diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-17 11:21:14 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-17 11:21:14 +0200 |
| commit | 5811d878180a85af5c41b9cb3b8f272d589539e9 (patch) | |
| tree | 16c27c0c797f004d20634e29d1752c994386537d /src/DevHive.Data/Repositories/DevHiveContext.cs | |
| parent | edf40b339c999c936d0e022100d67c853cd1b792 (diff) | |
| download | DevHive-5811d878180a85af5c41b9cb3b8f272d589539e9.tar DevHive-5811d878180a85af5c41b9cb3b8f272d589539e9.tar.gz DevHive-5811d878180a85af5c41b9cb3b8f272d589539e9.zip | |
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
Diffstat (limited to 'src/DevHive.Data/Repositories/DevHiveContext.cs')
| -rw-r--r-- | src/DevHive.Data/Repositories/DevHiveContext.cs | 4 |
1 files changed, 4 insertions, 0 deletions
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<User>() .HasIndex(x => x.UserName) .IsUnique(); + + builder.Entity<Role>() + .HasIndex(x => x.Id) + .IsUnique(); base.OnModelCreating(builder); } |
