From 02670870b2711db0984f492d452a90477c67608a Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 20 Oct 2023 14:26:02 +1100 Subject: Gallery --- ...0031326_NullableCurrentUploadedFile.Designer.cs | 490 +++++++++++++++++++++ 1 file changed, 490 insertions(+) create mode 100644 Migrations/20231020031326_NullableCurrentUploadedFile.Designer.cs (limited to 'Migrations/20231020031326_NullableCurrentUploadedFile.Designer.cs') diff --git a/Migrations/20231020031326_NullableCurrentUploadedFile.Designer.cs b/Migrations/20231020031326_NullableCurrentUploadedFile.Designer.cs new file mode 100644 index 0000000..89f933c --- /dev/null +++ b/Migrations/20231020031326_NullableCurrentUploadedFile.Designer.cs @@ -0,0 +1,490 @@ +// +using System; +using HyperBooru; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace HyperBooru.Migrations +{ + [DbContext(typeof(HBContext))] + [Migration("20231020031326_NullableCurrentUploadedFile")] + partial class NullableCurrentUploadedFile + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.12") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("HyperBooru.Acl", b => + { + b.Property("AclId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("AclId")); + + b.HasKey("AclId"); + + b.ToTable("Acls"); + }); + + modelBuilder.Entity("HyperBooru.AclRule", b => + { + b.Property("AclRuleId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("AclRuleId")); + + b.Property("AclId") + .HasColumnType("integer"); + + b.Property("Action") + .HasColumnType("integer"); + + b.Property("Permissions") + .HasColumnType("bigint"); + + b.Property("Principal") + .IsRequired() + .HasColumnType("bytea"); + + b.HasKey("AclRuleId"); + + b.HasIndex("AclId"); + + b.ToTable("AclRules"); + }); + + modelBuilder.Entity("HyperBooru.HBObject", b => + { + b.Property("ObjectId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ObjectId")); + + b.Property("AclId") + .HasColumnType("integer"); + + b.Property("Guid") + .HasColumnType("uuid"); + + b.Property("Owner") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("bytea") + .HasDefaultValue(new byte[] { 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }); + + b.HasKey("ObjectId"); + + b.HasIndex("AclId") + .IsUnique(); + + b.HasIndex("Guid"); + + b.ToTable("Objects", (string)null); + + b.UseTptMappingStrategy(); + }); + + modelBuilder.Entity("HyperBooru.LocalPrincipal", b => + { + b.Property("LocalPrincipalId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("LocalPrincipalId")); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Sid") + .IsRequired() + .HasColumnType("bytea"); + + b.HasKey("LocalPrincipalId"); + + b.HasIndex("Name"); + + b.HasIndex("Sid"); + + b.ToTable("SecurityPrincipals", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("LocalPrincipal"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("HyperBooru.OcrData", b => + { + b.Property("OcrDataId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("OcrDataId")); + + b.Property("MediaId") + .HasColumnType("integer"); + + b.Property("SearchableText") + .IsRequired() + .HasColumnType("text"); + + b.Property("Text") + .IsRequired() + .HasColumnType("text"); + + b.Property("Timestamp") + .HasColumnType("timestamp with time zone"); + + b.HasKey("OcrDataId"); + + b.HasIndex("MediaId") + .IsUnique(); + + b.ToTable("OcrData"); + }); + + modelBuilder.Entity("LocalGroupLocalPrincipal", b => + { + b.Property("LocalPrincipalId") + .HasColumnType("integer"); + + b.Property("MemberOfLocalPrincipalId") + .HasColumnType("integer"); + + b.HasKey("LocalPrincipalId", "MemberOfLocalPrincipalId"); + + b.HasIndex("MemberOfLocalPrincipalId"); + + b.ToTable("SecurityPrincipalMemberships", (string)null); + }); + + modelBuilder.Entity("TagDefinitionTagDefinition", b => + { + b.Property("ImplicitTagsObjectId") + .HasColumnType("integer"); + + b.Property("TagDefinitionObjectId") + .HasColumnType("integer"); + + b.HasKey("ImplicitTagsObjectId", "TagDefinitionObjectId"); + + b.HasIndex("TagDefinitionObjectId"); + + b.ToTable("ImplicitTags", (string)null); + }); + + modelBuilder.Entity("HyperBooru.Media", b => + { + b.HasBaseType("HyperBooru.HBObject"); + + b.Property("CurrentUploadedFileId") + .HasColumnType("integer"); + + b.Property("LongDescription") + .HasColumnType("text"); + + b.Property("ShortDescription") + .HasColumnType("text"); + + b.HasIndex("CurrentUploadedFileId") + .IsUnique(); + + b.ToTable("Media", (string)null); + }); + + modelBuilder.Entity("HyperBooru.Tag", b => + { + b.HasBaseType("HyperBooru.HBObject"); + + b.Property("CreateTime") + .HasColumnType("timestamp with time zone"); + + b.Property("TagDefinitionId") + .HasColumnType("integer"); + + b.Property("TargetObjectId") + .HasColumnType("integer"); + + b.HasIndex("TagDefinitionId"); + + b.HasIndex("TargetObjectId"); + + b.ToTable("Tags", (string)null); + }); + + modelBuilder.Entity("HyperBooru.TagDefinition", b => + { + b.HasBaseType("HyperBooru.HBObject"); + + b.Property("Alias") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Namespace") + .HasColumnType("text"); + + b.Property("Source") + .HasColumnType("integer"); + + b.ToTable("TagDefinitions", (string)null); + + b.HasData( + new + { + ObjectId = -1, + Guid = new Guid("ebdad4f8-455a-4351-8017-1d4854d6fa38"), + Owner = new byte[] { 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + Name = "nsfw", + Source = 0 + }, + new + { + ObjectId = -2, + Guid = new Guid("ea212801-5bcc-4c0e-814f-fb9d30db58bc"), + Owner = new byte[] { 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + Name = "ingest", + Source = 0 + }); + }); + + modelBuilder.Entity("HyperBooru.UploadedFile", b => + { + b.HasBaseType("HyperBooru.HBObject"); + + b.Property("Checksum") + .IsRequired() + .HasColumnType("text"); + + b.Property("ChecksumVerified") + .HasColumnType("boolean"); + + b.Property("CreateTime") + .HasColumnType("timestamp with time zone"); + + b.Property("Filename") + .HasColumnType("text"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("LastAccessTime") + .HasColumnType("timestamp with time zone"); + + b.Property("LastWriteTime") + .HasColumnType("timestamp with time zone"); + + b.Property("Length") + .HasColumnType("bigint"); + + b.Property("MediaObjectId") + .HasColumnType("integer"); + + b.Property("MimeType") + .IsRequired() + .HasColumnType("text"); + + b.Property("UploadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasIndex("MediaObjectId"); + + b.ToTable("UploadedFiles", (string)null); + }); + + modelBuilder.Entity("HyperBooru.LocalGroup", b => + { + b.HasBaseType("HyperBooru.LocalPrincipal"); + + b.HasDiscriminator().HasValue("LocalGroup"); + }); + + modelBuilder.Entity("HyperBooru.LocalUser", b => + { + b.HasBaseType("HyperBooru.LocalPrincipal"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("text"); + + b.HasDiscriminator().HasValue("LocalUser"); + + b.HasData( + new + { + LocalPrincipalId = -1, + Name = "Administrator", + Sid = new byte[] { 1, 1, 0, 0, 0, 0, 0, 5, 18, 0, 0, 0 }, + PasswordHash = "P4geAuE2yX/PDRHuJSq74FF5vO782rWz5c0LAQPR8m45DEYAONhu1wYnAn60PSNyjocqEBdnCeKCJfK3sKyuWw==" + }); + }); + + modelBuilder.Entity("HyperBooru.AclRule", b => + { + b.HasOne("HyperBooru.Acl", null) + .WithMany("Rules") + .HasForeignKey("AclId"); + }); + + modelBuilder.Entity("HyperBooru.HBObject", b => + { + b.HasOne("HyperBooru.Acl", "Acl") + .WithOne("Subject") + .HasForeignKey("HyperBooru.HBObject", "AclId"); + + b.Navigation("Acl"); + }); + + modelBuilder.Entity("HyperBooru.OcrData", b => + { + b.HasOne("HyperBooru.Media", "Media") + .WithOne("OcrData") + .HasForeignKey("HyperBooru.OcrData", "MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + }); + + modelBuilder.Entity("LocalGroupLocalPrincipal", b => + { + b.HasOne("HyperBooru.LocalPrincipal", null) + .WithMany() + .HasForeignKey("LocalPrincipalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HyperBooru.LocalGroup", null) + .WithMany() + .HasForeignKey("MemberOfLocalPrincipalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("TagDefinitionTagDefinition", b => + { + b.HasOne("HyperBooru.TagDefinition", null) + .WithMany() + .HasForeignKey("ImplicitTagsObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HyperBooru.TagDefinition", null) + .WithMany() + .HasForeignKey("TagDefinitionObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("HyperBooru.Media", b => + { + b.HasOne("HyperBooru.UploadedFile", "CurrentUploadedFile") + .WithOne() + .HasForeignKey("HyperBooru.Media", "CurrentUploadedFileId"); + + b.HasOne("HyperBooru.HBObject", null) + .WithOne() + .HasForeignKey("HyperBooru.Media", "ObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CurrentUploadedFile"); + }); + + modelBuilder.Entity("HyperBooru.Tag", b => + { + b.HasOne("HyperBooru.HBObject", null) + .WithOne() + .HasForeignKey("HyperBooru.Tag", "ObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HyperBooru.TagDefinition", "TagDefinition") + .WithMany() + .HasForeignKey("TagDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HyperBooru.HBObject", "Target") + .WithMany("Tags") + .HasForeignKey("TargetObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TagDefinition"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("HyperBooru.TagDefinition", b => + { + b.HasOne("HyperBooru.HBObject", null) + .WithOne() + .HasForeignKey("HyperBooru.TagDefinition", "ObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("HyperBooru.UploadedFile", b => + { + b.HasOne("HyperBooru.Media", "Media") + .WithMany("UploadedFiles") + .HasForeignKey("MediaObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HyperBooru.HBObject", null) + .WithOne() + .HasForeignKey("HyperBooru.UploadedFile", "ObjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + }); + + modelBuilder.Entity("HyperBooru.Acl", b => + { + b.Navigation("Rules"); + + b.Navigation("Subject") + .IsRequired(); + }); + + modelBuilder.Entity("HyperBooru.HBObject", b => + { + b.Navigation("Tags"); + }); + + modelBuilder.Entity("HyperBooru.Media", b => + { + b.Navigation("OcrData"); + + b.Navigation("UploadedFiles"); + }); +#pragma warning restore 612, 618 + } + } +} -- cgit v1.3