Skip to content

Commit

Permalink
[Fix-2947] Fix the issue of missing single quotes in the default valu…
Browse files Browse the repository at this point in the history
…e of MySQL table building statements
  • Loading branch information
aiwenmo committed Jan 12, 2024
1 parent 722e38f commit 421c1c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private String genTable(Table table) {

final String dv = column.getDefaultValue();
String defaultValue = Asserts.isNotNull(dv)
? String.format(" DEFAULT %s", dv.isEmpty() ? "\"\"" : dv)
? String.format(" DEFAULT '%s'", dv.isEmpty() ? "''" : dv)
: String.format("%s NULL ", !column.isNullable() ? " NOT " : "");

return String.format(
Expand Down

0 comments on commit 421c1c3

Please sign in to comment.