PhotoLabel: Change index order for improved performance #121

This commit is contained in:
Michael Mayer 2019-07-03 19:58:53 +02:00
parent 10269c6f6c
commit f9c18446bf

View file

@ -6,8 +6,8 @@ import (
// Photo labels are weighted by uncertainty (100 - confidence)
type PhotoLabel struct {
LabelID uint `gorm:"primary_key;auto_increment:false"`
PhotoID uint `gorm:"primary_key;auto_increment:false"`
LabelID uint `gorm:"primary_key;auto_increment:false;index"`
LabelUncertainty int
LabelSource string
Photo *Photo