aboutsummaryrefslogtreecommitdiff
path: root/src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-03-25 12:22:54 +0200
committertranstrike <transtrike@gmail.com>2021-03-25 12:22:54 +0200
commitd53caaea6094136bac3d01ce9dd2782bb1819fe2 (patch)
tree0c15e12d9a694600a51070295b0358cee1463545 /src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
parent9b04b4f2b031a3c631dba65908f277996015ae05 (diff)
downloadDevHive-d53caaea6094136bac3d01ce9dd2782bb1819fe2.tar
DevHive-d53caaea6094136bac3d01ce9dd2782bb1819fe2.tar.gz
DevHive-d53caaea6094136bac3d01ce9dd2782bb1819fe2.zip
Profile Picture implemented; Tests and Front end work await
Diffstat (limited to 'src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs')
-rw-r--r--src/Data/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs30
1 files changed, 11 insertions, 19 deletions
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<string>("PictureURL")
.HasColumnType("text");
- b.Property<Guid>("UserId")
- .HasColumnType("uuid");
-
b.HasKey("Id");
- b.HasIndex("UserId")
- .IsUnique();
-
b.ToTable("ProfilePicture");
});
@@ -274,6 +268,9 @@ namespace DevHive.Data.Migrations
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("boolean");
+ b.Property<Guid?>("ProfilePictureId")
+ .HasColumnType("uuid");
+
b.Property<string>("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