mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
dialect/sql/schema: handle pg bytea for schema changes (#1462)
This commit is contained in:
committed by
GitHub
parent
2bfb34fe82
commit
5421d6c628
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user