summaryrefslogtreecommitdiff
path: root/HBContext.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-08-17 09:36:09 +1000
committerJake Mannens <jake@asger.xyz>2023-08-17 09:36:09 +1000
commit727dcaacc6df8813a9296ac858dd51d11f3737b8 (patch)
tree916834e8d626ddd1cf9618e01dff1a01ad25f94a /HBContext.cs
parent6a6514df8b5f40cad4f5afb284bdd199f0e8f450 (diff)
Update DB schema to fix implicit tags bug
Diffstat (limited to 'HBContext.cs')
-rw-r--r--HBContext.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/HBContext.cs b/HBContext.cs
index 17b8b3d..162a2c7 100644
--- a/HBContext.cs
+++ b/HBContext.cs
@@ -1,5 +1,6 @@
using Microsoft.EntityFrameworkCore;
using HyperBooru.Services;
+using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
namespace HyperBooru;
@@ -37,5 +38,9 @@ public class HBContext : DbContext {
new() { ObjectId = -1, Source = TagSource.Internal, Name = "nsfw" },
new() { ObjectId = -2, Source = TagSource.Internal, Name = "ingest" }
});
+
+ modelBuilder.Entity<TagDefinition>()
+ .HasMany(e => e.ImplicitTags)
+ .WithMany();
}
} \ No newline at end of file