Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: sync schema use column nullable (#3900)

Danny Xuc669b7bb5e17
diff --git a/plugin/db/mysql/sync.go b/plugin/db/mysql/sync.go
index dd0564c7b4..47117994ac 100644
--- a/plugin/db/mysql/sync.go
+++ b/plugin/db/mysql/sync.go
@@ -221,6 +221,10 @@ func (driver *Driver) SyncDBSchema(ctx context.Context, databaseName string) (*d
if defaultStr.Valid {
column.Default = &defaultStr.String
}
+ // TODO(d): use convertBoolFromYesNo() if possible.
+ if nullable == "YES" {
+ column.Nullable = true
+ }
key := fmt.Sprintf("%s/%s", dbName, tableName)
if tableList, ok := columnMap[key]; ok {