Skip to content

Commit

Permalink
Add index
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Mar 9, 2024
1 parent c9d2594 commit 7f7402f
Show file tree
Hide file tree
Showing 5 changed files with 1,188 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Damselfly.Core/Database/ImageContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity<Person>().HasIndex(x => x.State);
modelBuilder.Entity<Tag>().HasIndex(x => new { x.Keyword }).IsUnique();

modelBuilder.Entity<ImageObject>().HasIndex(x => x.ImageId);
modelBuilder.Entity<ImageObject>().HasIndex(x => x.PersonId);
modelBuilder.Entity<ImageObject>().HasIndex(x => new { x.ImageId, x.PersonId});

modelBuilder.Entity<ImageMetaData>().HasIndex(x => x.ImageId);
modelBuilder.Entity<ImageMetaData>().HasIndex(x => x.DateTaken);
modelBuilder.Entity<ImageMetaData>().HasIndex(x => x.ThumbLastUpdated);
Expand Down
Loading

0 comments on commit 7f7402f

Please sign in to comment.