Skip to content

Commit

Permalink
fix: add missing DATABASE
Browse files Browse the repository at this point in the history
  • Loading branch information
Daesgar committed Oct 17, 2024
1 parent 3589b84 commit 790b871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func dbCreateStmt(db *sql.DB, dbName string) (string, error) {
return "", fmt.Errorf("getting database %s create statement: %v", dbName, err)
}

return strings.Replace(createStmt, "CREATE", "CREATE IF NOT EXISTS", 1), nil
return strings.Replace(createStmt, "CREATE DATABASE", "CREATE DATABASE IF NOT EXISTS", 1), nil
}

func fetchTableCreateStmt(db *sql.DB, dbName string, tableName string) (string, error) {
Expand Down

0 comments on commit 790b871

Please sign in to comment.