dialect/sql/schema: handle pg bytea for schema changes (#1462)

This commit is contained in:
Christoph Hartmann
2021-04-19 13:46:01 +02:00
committed by GitHub
parent 2bfb34fe82
commit 5421d6c628

View File

@@ -261,6 +261,8 @@ func (c *Column) ScanDefault(value string) error {
return fmt.Errorf("scanning json value for column %q: %w", c.Name, err)
}
c.Default = v.String
case c.Type == field.TypeBytes:
c.Default = []byte(value)
default:
return fmt.Errorf("unsupported default type: %v", c.Type)
}