Skip to content

Commit

Permalink
Merge pull request #762 from SiaFoundation/chris/missing-indices-migr…
Browse files Browse the repository at this point in the history
…ation-fix

Move missing indices migration
  • Loading branch information
ChrisSchinnerl authored Nov 23, 2023
2 parents 468dbf3 + 295373a commit 2efacaf
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions stores/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,16 +1032,7 @@ func performMigration00019_accountsShutdown(txn *gorm.DB, logger *zap.SugaredLog

func performMigration00020_missingIndices(txn *gorm.DB, logger *zap.SugaredLogger) error {
logger.Info("performing migration 00020_missingIndices")
var err error
detectMissingIndices(txn, func(dst interface{}, name string) {
if err != nil {
return
}
err = txn.Migrator().CreateIndex(dst, name)
})
if err != nil {
return fmt.Errorf("failed to create missing indices: %w", err)
}
// removed since it caused issues when migrating old nodes
logger.Info("migration 00020_missingIndices complete")
return nil
}
Expand Down

0 comments on commit 2efacaf

Please sign in to comment.