Skip to content

Commit

Permalink
Merge pull request #30 from fastbill/update-fixes
Browse files Browse the repository at this point in the history
fix DB seeding function
  • Loading branch information
junedev authored Jan 15, 2021
2 parents 7e7072a + 8f6b20f commit 320b914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func MustApplyDatabaseSeed(file string, db *gorm.DB) {
result := struct {
Rows uint64
}{}
if err := db.Raw(applySeedCheckSQL).Scan(&result).Error; err != nil {
if err := db.Raw(applySeedCheckSQL, db.Migrator().CurrentDatabase()).Scan(&result).Error; err != nil {
panic(fmt.Errorf("failed to check whether seed should be applied: %w", err))
}

Expand Down

0 comments on commit 320b914

Please sign in to comment.