We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82d22c0 commit de3c27cCopy full SHA for de3c27c
sql/planbuilder/ddl.go
@@ -1298,7 +1298,9 @@ func validateDefaultExprs(col *sql.Column) error {
1298
if col.Default == nil {
1299
return nil
1300
}
1301
-
+ if !(types.IsDatetimeType(col.Type) || types.IsTimestampType(col.Type)) {
1302
+ return nil
1303
+ }
1304
var colPrec int
1305
if dt, ok := col.Type.(sql.DatetimeType); ok {
1306
colPrec = dt.Precision()
@@ -1308,7 +1310,6 @@ func validateDefaultExprs(col *sql.Column) error {
1308
1310
} else if !isValid {
1309
1311
return sql.ErrInvalidColumnDefaultValue.New(col.Name)
1312
1313
1314
1315
0 commit comments