postgres
postgres copied to clipboard
AutoMigrate() panic handling model that has `gorm:"default"` columns
GORM Playground Link
https://github.com/go-gorm/playground/pull/461
Description
Tested with postgres driver v1.3.1
to v1.3.3
Panic occurs only on v1.3.3
Seeing same... I didn't change column type, but now getting this
2022/04/09 07:20:39 /Users/xxxx/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:252 ERROR: syntax error at or near "not" (SQLSTATE 42601)
master | [0.858ms] [rows:0] ALTER TABLE "mytable" ALTER COLUMN "data" TYPE jsonb not null default '{}'::jsonb
tests pass in latest version.