diff options
| -rw-r--r-- | HyperBooruContext.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/HyperBooruContext.cs b/HyperBooruContext.cs index 8223ee3..fecbc4c 100644 --- a/HyperBooruContext.cs +++ b/HyperBooruContext.cs @@ -21,4 +21,12 @@ public class HyperBooruDbContext : DbContext { var path = Path.Join(config.DataPath, "HyperBooru.db"); options.UseSqlite($"Data Source = {config.DbPath}"); } + + protected override void OnModelCreating(ModelBuilder modelBuilder) { + modelBuilder.Entity<DbObject>().ToTable("Objects"); + modelBuilder.Entity<DbTagDefinition>().ToTable("TagDefinitions"); + modelBuilder.Entity<DbTag>().ToTable("Tags"); + modelBuilder.Entity<DbMedia>().ToTable("Media"); + modelBuilder.Entity<DbUploadedFile>().ToTable("UploadedFiles"); + } }
\ No newline at end of file |
