From 89b7886581f04ee87ffea81389cd775b1e301bc4 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 2 Jul 2019 19:27:21 +0200 Subject: [PATCH] Add index to photo_lat, photo_long and taken_at --- internal/models/photo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/models/photo.go b/internal/models/photo.go index 0337032b8..3978b1566 100644 --- a/internal/models/photo.go +++ b/internal/models/photo.go @@ -22,8 +22,8 @@ type Photo struct { PhotoPrivate bool PhotoSensitive bool PhotoStory bool - PhotoLat float64 - PhotoLong float64 + PhotoLat float64 `gorm:"type:index;"` + PhotoLong float64 `gorm:"type:index;"` PhotoAltitude int PhotoFocalLength int PhotoIso int @@ -41,7 +41,7 @@ type Photo struct { LocationID uint LocationChanged bool LocationEstimated bool - TakenAt time.Time + TakenAt time.Time `gorm:"type:index;"` TakenAtChanged bool TimeZone string Labels []*PhotoLabel