update database for surveylib
This commit is contained in:
parent
c080e09cfb
commit
9b3faed8fc
4 changed files with 386 additions and 0 deletions
|
|
@ -119,6 +119,9 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
|||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CompletedBy")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("FinishedAt")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
|
@ -127,6 +130,8 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CompletedBy");
|
||||
|
||||
b.HasIndex("SurveyId");
|
||||
|
||||
b.ToTable("Completions");
|
||||
|
|
@ -256,6 +261,11 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
||||
{
|
||||
b.HasOne("SurveyBackend.Core.Models.User", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("CompletedBy")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("SurveyLib.Core.Models.Survey", "Survey")
|
||||
.WithMany("Completions")
|
||||
.HasForeignKey("SurveyId")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue