diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-11 14:41:40 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-08-11 14:41:40 +1000 |
| commit | 0d758c6cd118641e86e6a7ddd7285be916cdb2d8 (patch) | |
| tree | 846038e97117c48106db059592a7b41749cbcd11 /Migrations/20230809044429_Initial.Designer.cs | |
| parent | bc8385a9e63253a3190b08467cbf31d0256053e8 (diff) | |
Updated database schema to use separate tables
Diffstat (limited to 'Migrations/20230809044429_Initial.Designer.cs')
| -rw-r--r-- | Migrations/20230809044429_Initial.Designer.cs | 206 |
1 files changed, 0 insertions, 206 deletions
diff --git a/Migrations/20230809044429_Initial.Designer.cs b/Migrations/20230809044429_Initial.Designer.cs deleted file mode 100644 index 78a0ca3..0000000 --- a/Migrations/20230809044429_Initial.Designer.cs +++ /dev/null @@ -1,206 +0,0 @@ -// <auto-generated /> -using System; -using HyperBooru; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace HyperBooru.Migrations -{ - [DbContext(typeof(HyperBooruDbContext))] - [Migration("20230809044429_Initial")] - partial class Initial - { - /// <inheritdoc /> - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Proxies:ChangeTracking", false) - .HasAnnotation("Proxies:CheckEquality", false) - .HasAnnotation("Proxies:LazyLoading", true); - - modelBuilder.Entity("HyperBooru.DbObject", b => - { - b.Property<int>("ObjectId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property<string>("Discriminator") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property<Guid>("Guid") - .HasColumnType("TEXT"); - - b.Property<int>("ObjectType") - .HasColumnType("INTEGER"); - - b.HasKey("ObjectId"); - - b.HasIndex("Guid"); - - b.ToTable("Objects"); - - b.HasDiscriminator<string>("Discriminator").HasValue("DbObject"); - - b.UseTphMappingStrategy(); - }); - - modelBuilder.Entity("HyperBooru.DbUploadedFile", b => - { - b.Property<int>("UploadedFileId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property<DateTime?>("CreateTime") - .HasColumnType("TEXT"); - - b.Property<string>("Filename") - .HasColumnType("TEXT"); - - b.Property<DateTime?>("LastAccessTime") - .HasColumnType("TEXT"); - - b.Property<DateTime?>("LastWriteTime") - .HasColumnType("TEXT"); - - b.Property<int>("MediaObjectId") - .HasColumnType("INTEGER"); - - b.Property<string>("OriginalChecksum") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property<DateTime>("UploadTime") - .HasColumnType("TEXT"); - - b.HasKey("UploadedFileId"); - - b.HasIndex("MediaObjectId"); - - b.ToTable("UploadedFiles"); - }); - - modelBuilder.Entity("HyperBooru.DbMedia", b => - { - b.HasBaseType("HyperBooru.DbObject"); - - b.Property<string>("Checksum") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property<string>("LongDescription") - .HasColumnType("TEXT"); - - b.Property<string>("MimeType") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property<string>("ShortDescription") - .HasColumnType("TEXT"); - - b.HasDiscriminator().HasValue("DbMedia"); - }); - - modelBuilder.Entity("HyperBooru.DbTag", b => - { - b.HasBaseType("HyperBooru.DbObject"); - - b.Property<DateTime>("CreateTime") - .HasColumnType("TEXT"); - - b.Property<int>("TagDefinitionObjectId") - .HasColumnType("INTEGER"); - - b.Property<int>("TargetObjectId") - .HasColumnType("INTEGER"); - - b.HasIndex("TagDefinitionObjectId"); - - b.HasIndex("TargetObjectId"); - - b.HasDiscriminator().HasValue("DbTag"); - }); - - modelBuilder.Entity("HyperBooru.DbTagDefinition", b => - { - b.HasBaseType("HyperBooru.DbObject"); - - b.Property<int?>("DbTagDefinitionObjectId") - .HasColumnType("INTEGER"); - - b.Property<string>("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property<string>("Namespace") - .HasColumnType("TEXT"); - - b.Property<int>("Source") - .HasColumnType("INTEGER"); - - b.HasIndex("DbTagDefinitionObjectId"); - - b.HasDiscriminator().HasValue("DbTagDefinition"); - }); - - modelBuilder.Entity("HyperBooru.DbUploadedFile", b => - { - b.HasOne("HyperBooru.DbMedia", "Media") - .WithMany("UploadedFiles") - .HasForeignKey("MediaObjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Media"); - }); - - modelBuilder.Entity("HyperBooru.DbTag", b => - { - b.HasOne("HyperBooru.DbTagDefinition", "TagDefinition") - .WithMany() - .HasForeignKey("TagDefinitionObjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("HyperBooru.DbObject", "Target") - .WithMany("Tags") - .HasForeignKey("TargetObjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TagDefinition"); - - b.Navigation("Target"); - }); - - modelBuilder.Entity("HyperBooru.DbTagDefinition", b => - { - b.HasOne("HyperBooru.DbTagDefinition", null) - .WithMany("ImplicitTags") - .HasForeignKey("DbTagDefinitionObjectId"); - }); - - modelBuilder.Entity("HyperBooru.DbObject", b => - { - b.Navigation("Tags"); - }); - - modelBuilder.Entity("HyperBooru.DbMedia", b => - { - b.Navigation("UploadedFiles"); - }); - - modelBuilder.Entity("HyperBooru.DbTagDefinition", b => - { - b.Navigation("ImplicitTags"); - }); -#pragma warning restore 612, 618 - } - } -} |
