summaryrefslogtreecommitdiff
path: root/Migrations/HyperBooruDbContextModelSnapshot.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Migrations/HyperBooruDbContextModelSnapshot.cs')
-rw-r--r--Migrations/HyperBooruDbContextModelSnapshot.cs39
1 files changed, 27 insertions, 12 deletions
diff --git a/Migrations/HyperBooruDbContextModelSnapshot.cs b/Migrations/HyperBooruDbContextModelSnapshot.cs
index 566b66c..36f6e72 100644
--- a/Migrations/HyperBooruDbContextModelSnapshot.cs
+++ b/Migrations/HyperBooruDbContextModelSnapshot.cs
@@ -27,10 +27,6 @@ namespace HyperBooru.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
- b.Property<string>("Discriminator")
- .IsRequired()
- .HasColumnType("TEXT");
-
b.Property<Guid>("Guid")
.HasColumnType("TEXT");
@@ -41,11 +37,9 @@ namespace HyperBooru.Migrations
b.HasIndex("Guid");
- b.ToTable("Objects");
-
- b.HasDiscriminator<string>("Discriminator").HasValue("DbObject");
+ b.ToTable("Objects", (string)null);
- b.UseTphMappingStrategy();
+ b.UseTptMappingStrategy();
});
modelBuilder.Entity("HyperBooru.DbUploadedFile", b =>
@@ -80,7 +74,7 @@ namespace HyperBooru.Migrations
b.HasIndex("MediaObjectId");
- b.ToTable("UploadedFiles");
+ b.ToTable("UploadedFiles", (string)null);
});
modelBuilder.Entity("HyperBooru.DbMedia", b =>
@@ -101,7 +95,7 @@ namespace HyperBooru.Migrations
b.Property<string>("ShortDescription")
.HasColumnType("TEXT");
- b.HasDiscriminator().HasValue("DbMedia");
+ b.ToTable("Media", (string)null);
});
modelBuilder.Entity("HyperBooru.DbTag", b =>
@@ -121,7 +115,7 @@ namespace HyperBooru.Migrations
b.HasIndex("TargetObjectId");
- b.HasDiscriminator().HasValue("DbTag");
+ b.ToTable("Tags", (string)null);
});
modelBuilder.Entity("HyperBooru.DbTagDefinition", b =>
@@ -143,7 +137,7 @@ namespace HyperBooru.Migrations
b.HasIndex("DbTagDefinitionObjectId");
- b.HasDiscriminator().HasValue("DbTagDefinition");
+ b.ToTable("TagDefinitions", (string)null);
});
modelBuilder.Entity("HyperBooru.DbUploadedFile", b =>
@@ -157,8 +151,23 @@ namespace HyperBooru.Migrations
b.Navigation("Media");
});
+ modelBuilder.Entity("HyperBooru.DbMedia", b =>
+ {
+ b.HasOne("HyperBooru.DbObject", null)
+ .WithOne()
+ .HasForeignKey("HyperBooru.DbMedia", "ObjectId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
modelBuilder.Entity("HyperBooru.DbTag", b =>
{
+ b.HasOne("HyperBooru.DbObject", null)
+ .WithOne()
+ .HasForeignKey("HyperBooru.DbTag", "ObjectId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
b.HasOne("HyperBooru.DbTagDefinition", "TagDefinition")
.WithMany()
.HasForeignKey("TagDefinitionObjectId")
@@ -181,6 +190,12 @@ namespace HyperBooru.Migrations
b.HasOne("HyperBooru.DbTagDefinition", null)
.WithMany("ImplicitTags")
.HasForeignKey("DbTagDefinitionObjectId");
+
+ b.HasOne("HyperBooru.DbObject", null)
+ .WithOne()
+ .HasForeignKey("HyperBooru.DbTagDefinition", "ObjectId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
});
modelBuilder.Entity("HyperBooru.DbObject", b =>