Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ func (d *DB) UpdateSchema(reportEnd *time.Time) error {
&models.ProwJobRunAnnotation{},
&models.Test{},
&models.Suite{},
&models.ProwJobRunTest{},
&models.ProwJobRunTestOutput{},
&models.APISnapshot{},
&models.Bug{},
&models.ProwPullRequest{},
Expand Down Expand Up @@ -111,6 +109,10 @@ func (d *DB) UpdateSchema(reportEnd *time.Time) error {
}
}

// TODO(fbabcock): Add support for migrating partitioned table
// &models.ProwJobRunTest{},
// &models.ProwJobRunTestOutput{},

if err := createAuditLogIndexes(d.DB); err != nil {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/db/models/prow.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ type Test struct {

// ProwJobRunTest defines a join table linking tests to the job runs they execute in, along with the status for
// that execution.
// Do not update until after partitions have been enabled
type ProwJobRunTest struct {
gorm.Model
ProwJobRunID uint `gorm:"index"`
Expand All @@ -102,6 +103,7 @@ type ProwJobRunTest struct {
ProwJobRunTestOutput *ProwJobRunTestOutput `gorm:"constraint:OnDelete:CASCADE;"`
}

// Do not update until after partitions have been enabled
type ProwJobRunTestOutput struct {
gorm.Model
ProwJobRunTestID uint `gorm:"index"`
Expand Down