File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/me/cobeine/sqlava/connection/database/table/column Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ public Column size(int size) {
37
37
}
38
38
39
39
public Column defaultValue (Object defaultValue ) {
40
+ if (defaultValue instanceof String ){
41
+ defaultValue = "'" + defaultValue + "'" ;
42
+ }
40
43
this .defaultValue = defaultValue ;
41
44
return this ;
42
45
}
@@ -61,8 +64,7 @@ public String toString() {
61
64
builder .deleteCharAt (builder .length () - 1 );
62
65
}
63
66
if (defaultValue != null && !settings .contains (ColumnSettings .AUTO_INCREMENT )) {
64
- builder .append (" DEFAULT '" )
65
- .append ((defaultValue instanceof String ? "'" + defaultValue + "'" : defaultValue )).append ("'" );
67
+ builder .append (" DEFAULT " ).append (defaultValue );
66
68
}
67
69
return builder .toString ();
68
70
}
You can’t perform that action at this time.
0 commit comments