diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-12 19:06:00 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-08-12 19:06:00 +1000 |
| commit | 3ce156d00197a894ac9b0507544afd51aec2a0fd (patch) | |
| tree | a20e12c7bd0fe413d192ed454db07165e14551fd /Migrations/HyperBooruDbContextModelSnapshot.cs | |
| parent | b704601c81f026f63391b8f05f271ac3f427a20a (diff) | |
| parent | 0d758c6cd118641e86e6a7ddd7285be916cdb2d8 (diff) | |
Merge branch 'dev' of gitlab.com:plasmicplexus/HyperBooru-Server into dev
Diffstat (limited to 'Migrations/HyperBooruDbContextModelSnapshot.cs')
| -rw-r--r-- | Migrations/HyperBooruDbContextModelSnapshot.cs | 39 |
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 => |
