Skip to content

Commit

Permalink
update mysql type for repo keys (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
KCarretto authored Feb 20, 2024
1 parent 2c320c8 commit 57c37fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tavern/internal/ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions tavern/internal/ent/schema/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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 All @@ -32,13 +33,19 @@ func (Repository) Fields() []ent.Field {
Comment("URL of the repository"),
field.String("public_key").
NotEmpty().
SchemaType(map[string]string{
dialect.MySQL: "LONGTEXT", // Override MySQL, improve length maximum
}).
Annotations(
entgql.Skip(entgql.SkipMutationCreateInput | entgql.SkipMutationUpdateInput),
).
Comment("Public key associated with this repositories private key"),
field.String("private_key").
NotEmpty().
Sensitive().
SchemaType(map[string]string{
dialect.MySQL: "LONGTEXT", // Override MySQL, improve length maximum
}).
Annotations(
entgql.Skip(entgql.SkipAll),
).
Expand Down

0 comments on commit 57c37fb

Please sign in to comment.