Skip to content

Commit

Permalink
fix: reset the error state for the table exists check
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse committed Jan 23, 2025
1 parent 96d3cd8 commit 98baf7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func TableExists(tx *gorm.DB, tableName string) bool {
err := tx.Exec(query).Error
if err != nil {
log.Printf("TableExists check failed for: %s, error: %v", tableName, err)
tx.Error = nil
return false
}
// If the query succeeds, the table exists:
Expand Down

0 comments on commit 98baf7b

Please sign in to comment.