Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tavern/internal/ent/schema/host_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"entgo.io/contrib/entgql"
"entgo.io/ent"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema"
"entgo.io/ent/schema/edge"
Expand Down Expand Up @@ -52,6 +53,9 @@ func (HostFile) Fields() []ent.Field {
Comment("A SHA3-256 digest of the content field"),
field.Bytes("content").
Optional().
SchemaType(map[string]string{
dialect.MySQL: "LONGBLOB", // Override MySQL, improve length maximum
}).
Annotations(
entgql.Skip(), // Don't return file content in GraphQL queries
).
Expand Down
Loading