diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-01-30 11:31:48 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-01-30 11:31:48 +0200 |
| commit | 8b164bf4ac8c307de933b476e858e489a64c0da5 (patch) | |
| tree | da8146343066cf0cbc31c619e9a5602b9caf529c /src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | |
| parent | ff91162eb83dcf19402240ae8fa06f70cbf2b9e0 (diff) | |
| download | DevHive-8b164bf4ac8c307de933b476e858e489a64c0da5.tar DevHive-8b164bf4ac8c307de933b476e858e489a64c0da5.tar.gz DevHive-8b164bf4ac8c307de933b476e858e489a64c0da5.zip | |
Added cloud implementation migration
Diffstat (limited to 'src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs')
| -rw-r--r-- | src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs index cf0a82b..f662af7 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -1,5 +1,6 @@ // <auto-generated /> using System; +using System.Collections.Generic; using DevHive.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -25,13 +26,13 @@ namespace DevHive.Data.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property<Guid>("CreatorId") + b.Property<Guid?>("CreatorId") .HasColumnType("uuid"); b.Property<string>("Message") .HasColumnType("text"); - b.Property<Guid>("PostId") + b.Property<Guid?>("PostId") .HasColumnType("uuid"); b.Property<DateTime>("TimeCreated") @@ -39,6 +40,8 @@ namespace DevHive.Data.Migrations b.HasKey("Id"); + b.HasIndex("CreatorId"); + b.HasIndex("PostId"); b.ToTable("Comments"); @@ -64,9 +67,12 @@ namespace DevHive.Data.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property<Guid>("CreatorId") + b.Property<Guid?>("CreatorId") .HasColumnType("uuid"); + b.Property<List<string>>("FileUrls") + .HasColumnType("text[]"); + b.Property<string>("Message") .HasColumnType("text"); @@ -75,6 +81,8 @@ namespace DevHive.Data.Migrations b.HasKey("Id"); + b.HasIndex("CreatorId"); + b.ToTable("Posts"); }); @@ -364,11 +372,26 @@ namespace DevHive.Data.Migrations modelBuilder.Entity("DevHive.Data.Models.Comment", b => { - b.HasOne("DevHive.Data.Models.Post", null) + b.HasOne("DevHive.Data.Models.User", "Creator") .WithMany("Comments") - .HasForeignKey("PostId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("CreatorId"); + + b.HasOne("DevHive.Data.Models.Post", "Post") + .WithMany("Comments") + .HasForeignKey("PostId"); + + b.Navigation("Creator"); + + b.Navigation("Post"); + }); + + modelBuilder.Entity("DevHive.Data.Models.Post", b => + { + b.HasOne("DevHive.Data.Models.User", "Creator") + .WithMany("Posts") + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); }); modelBuilder.Entity("DevHive.Data.Models.User", b => @@ -500,7 +523,11 @@ namespace DevHive.Data.Migrations modelBuilder.Entity("DevHive.Data.Models.User", b => { + b.Navigation("Comments"); + b.Navigation("Friends"); + + b.Navigation("Posts"); }); #pragma warning restore 612, 618 } |
