SIGN IN SIGN UP
go-gorm / gorm UNCLAIMED

The fantastic ORM library for Golang, aims to be developer friendly

0 0 18 Go

fix(migrator): add nil guards to ColumnType methods to prevent panic (#7767)

When a driver populates ColumnType from information_schema but fails to
attach the *sql.ColumnType, calling DecimalSize(), Length(), Nullable(),
ScanType(), Name(), or DatabaseTypeName() panics on nil dereference.

Add nil checks before delegating to SQLColumnType in all 6 methods,
returning zero values when SQLColumnType is nil.

Fixes #7764
L
Li Duoyang committed
33229296228898b311e868090f30eed169f1ae7a
Parent: 40cd2af
Committed by GitHub <noreply@github.com> on 5/7/2026, 2:26:24 PM