diff options
| author | Jake Mannens <jake@asger.xyz> | 2024-02-05 15:33:27 +1100 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2024-02-05 15:33:27 +1100 |
| commit | 226538299372624c10450e203cefc665fcb439a2 (patch) | |
| tree | 258c2fe4f599d8d9db5b0581cb170880c650b963 /Migrations/HBContextModelSnapshot.cs | |
| parent | c7f2f42b07f5503e99568e288b6f27ae03ea6fa2 (diff) | |
Removed security migrations
Diffstat (limited to 'Migrations/HBContextModelSnapshot.cs')
| -rw-r--r-- | Migrations/HBContextModelSnapshot.cs | 174 |
1 files changed, 20 insertions, 154 deletions
diff --git a/Migrations/HBContextModelSnapshot.cs b/Migrations/HBContextModelSnapshot.cs index 9341db6..5d2cf4c 100644 --- a/Migrations/HBContextModelSnapshot.cs +++ b/Migrations/HBContextModelSnapshot.cs @@ -17,52 +17,11 @@ namespace HyperBooru.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.12") + .HasAnnotation("ProductVersion", "7.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - modelBuilder.Entity("HyperBooru.Acl", b => - { - b.Property<int>("AclId") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("AclId")); - - b.HasKey("AclId"); - - b.ToTable("Acls"); - }); - - modelBuilder.Entity("HyperBooru.AclRule", b => - { - b.Property<int>("AclRuleId") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("AclRuleId")); - - b.Property<int?>("AclId") - .HasColumnType("integer"); - - b.Property<int>("Action") - .HasColumnType("integer"); - - b.Property<long>("Permissions") - .HasColumnType("bigint"); - - b.Property<byte[]>("Principal") - .IsRequired() - .HasColumnType("bytea"); - - b.HasKey("AclRuleId"); - - b.HasIndex("AclId"); - - b.ToTable("AclRules"); - }); - modelBuilder.Entity("HyperBooru.HBObject", b => { b.Property<int>("ObjectId") @@ -71,23 +30,11 @@ namespace HyperBooru.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("ObjectId")); - b.Property<int?>("AclId") - .HasColumnType("integer"); - b.Property<Guid>("Guid") .HasColumnType("uuid"); - b.Property<byte[]>("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); @@ -95,39 +42,6 @@ namespace HyperBooru.Migrations b.UseTptMappingStrategy(); }); - modelBuilder.Entity("HyperBooru.LocalPrincipal", b => - { - b.Property<int>("LocalPrincipalId") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("LocalPrincipalId")); - - b.Property<string>("Discriminator") - .IsRequired() - .HasColumnType("text"); - - b.Property<string>("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property<byte[]>("Sid") - .IsRequired() - .HasColumnType("bytea"); - - b.HasKey("LocalPrincipalId"); - - b.HasIndex("Name"); - - b.HasIndex("Sid"); - - b.ToTable("SecurityPrincipals", (string)null); - - b.HasDiscriminator<string>("Discriminator").HasValue("LocalPrincipal"); - - b.UseTphMappingStrategy(); - }); - modelBuilder.Entity("HyperBooru.OcrData", b => { b.Property<int>("OcrDataId") @@ -158,21 +72,6 @@ namespace HyperBooru.Migrations b.ToTable("OcrData"); }); - modelBuilder.Entity("LocalGroupLocalPrincipal", b => - { - b.Property<int>("LocalPrincipalId") - .HasColumnType("integer"); - - b.Property<int>("MemberOfLocalPrincipalId") - .HasColumnType("integer"); - - b.HasKey("LocalPrincipalId", "MemberOfLocalPrincipalId"); - - b.HasIndex("MemberOfLocalPrincipalId"); - - b.ToTable("SecurityPrincipalMemberships", (string)null); - }); - modelBuilder.Entity("TagDefinitionTagDefinition", b => { b.Property<int>("ImplicitTagsObjectId") @@ -185,7 +84,7 @@ namespace HyperBooru.Migrations b.HasIndex("TagDefinitionObjectId"); - b.ToTable("ImplicitTags", (string)null); + b.ToTable("TagDefinitionTagDefinition"); }); modelBuilder.Entity("HyperBooru.Media", b => @@ -251,7 +150,6 @@ namespace HyperBooru.Migrations { 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 }, @@ -259,7 +157,6 @@ namespace HyperBooru.Migrations { 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 }); @@ -312,49 +209,32 @@ namespace HyperBooru.Migrations b.ToTable("UploadedFiles", (string)null); }); - modelBuilder.Entity("HyperBooru.LocalGroup", b => + modelBuilder.Entity("HyperBooru.User", b => { - b.HasBaseType("HyperBooru.LocalPrincipal"); - - b.HasDiscriminator().HasValue("LocalGroup"); - }); - - modelBuilder.Entity("HyperBooru.LocalUser", b => - { - b.HasBaseType("HyperBooru.LocalPrincipal"); + b.HasBaseType("HyperBooru.HBObject"); b.Property<string>("PasswordHash") .IsRequired() .HasColumnType("text"); - b.HasDiscriminator().HasValue("LocalUser"); + b.Property<string>("Username") + .IsRequired() + .HasColumnType("text"); + + b.HasIndex("Username"); + + b.ToTable("Users"); 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==" + ObjectId = -3, + Guid = new Guid("4fa948f4-7c45-4f81-bb6b-e417491e6c96"), + PasswordHash = "P4geAuE2yX/PDRHuJSq74FF5vO782rWz5c0LAQPR8m45DEYAONhu1wYnAn60PSNyjocqEBdnCeKCJfK3sKyuWw==", + Username = "admin" }); }); - 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") @@ -366,21 +246,6 @@ namespace HyperBooru.Migrations 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) @@ -462,11 +327,12 @@ namespace HyperBooru.Migrations b.Navigation("Media"); }); - modelBuilder.Entity("HyperBooru.Acl", b => + modelBuilder.Entity("HyperBooru.User", b => { - b.Navigation("Rules"); - - b.Navigation("Subject") + b.HasOne("HyperBooru.HBObject", null) + .WithOne() + .HasForeignKey("HyperBooru.User", "ObjectId") + .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); |
