From d53caaea6094136bac3d01ce9dd2782bb1819fe2 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 25 Mar 2021 12:22:54 +0200 Subject: Profile Picture implemented; Tests and Front end work await --- .../Migrations/DevHiveContextModelSnapshot.cs | 30 ++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs') diff --git a/src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs index 80e3ac0..8877fab 100644 --- a/src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -91,14 +91,8 @@ namespace DevHive.Data.Migrations b.Property("PictureURL") .HasColumnType("text"); - b.Property("UserId") - .HasColumnType("uuid"); - b.HasKey("Id"); - b.HasIndex("UserId") - .IsUnique(); - b.ToTable("ProfilePicture"); }); @@ -274,6 +268,9 @@ namespace DevHive.Data.Migrations b.Property("PhoneNumberConfirmed") .HasColumnType("boolean"); + b.Property("ProfilePictureId") + .HasColumnType("uuid"); + b.Property("SecurityStamp") .HasColumnType("text"); @@ -296,6 +293,8 @@ namespace DevHive.Data.Migrations .IsUnique() .HasDatabaseName("UserNameIndex"); + b.HasIndex("ProfilePictureId"); + b.HasIndex("UserId"); b.HasIndex("UserName") @@ -474,17 +473,6 @@ namespace DevHive.Data.Migrations b.Navigation("Creator"); }); - modelBuilder.Entity("DevHive.Data.Models.ProfilePicture", b => - { - b.HasOne("DevHive.Data.Models.User", "User") - .WithOne("ProfilePicture") - .HasForeignKey("DevHive.Data.Models.ProfilePicture", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - modelBuilder.Entity("DevHive.Data.Models.Rating", b => { b.HasOne("DevHive.Data.Models.Post", "Post") @@ -545,9 +533,15 @@ namespace DevHive.Data.Migrations modelBuilder.Entity("DevHive.Data.Models.User", b => { + b.HasOne("DevHive.Data.Models.ProfilePicture", "ProfilePicture") + .WithMany() + .HasForeignKey("ProfilePictureId"); + b.HasOne("DevHive.Data.Models.User", null) .WithMany("Friends") .HasForeignKey("UserId"); + + b.Navigation("ProfilePicture"); }); modelBuilder.Entity("LanguageUser", b => @@ -663,8 +657,6 @@ namespace DevHive.Data.Migrations b.Navigation("Posts"); - b.Navigation("ProfilePicture"); - b.Navigation("RatedPosts"); }); #pragma warning restore 612, 618 -- cgit v1.2.3