Skip to content

Commit 1ec34bf

Browse files
authored
feat(backend): Update db table config with Primary key to improve db read performance (kubeflow#1116)
1 parent 466cde6 commit 1ec34bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/src/apiserver/model/db_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
package model
1616

1717
type DBStatus struct {
18-
HaveSamplesLoaded bool `gorm:"column:HaveSamplesLoaded; not null"`
18+
HaveSamplesLoaded bool `gorm:"column:HaveSamplesLoaded; not null; primary_key"`
1919
}

backend/src/apiserver/model/default_experiment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
package model
1616

1717
type DefaultExperiment struct {
18-
DefaultExperimentId string `gorm:"column:DefaultExperimentId; not null"`
18+
DefaultExperimentId string `gorm:"column:DefaultExperimentId; not null; primary_key"`
1919
}

0 commit comments

Comments
 (0)