Skip to content

Commit 320b914

Browse files
authored
Merge pull request #30 from fastbill/update-fixes
fix DB seeding function
2 parents 7e7072a + 8f6b20f commit 320b914

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/seed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func MustApplyDatabaseSeed(file string, db *gorm.DB) {
2121
result := struct {
2222
Rows uint64
2323
}{}
24-
if err := db.Raw(applySeedCheckSQL).Scan(&result).Error; err != nil {
24+
if err := db.Raw(applySeedCheckSQL, db.Migrator().CurrentDatabase()).Scan(&result).Error; err != nil {
2525
panic(fmt.Errorf("failed to check whether seed should be applied: %w", err))
2626
}
2727

0 commit comments

Comments
 (0)