diff --git a/tavern/internal/ent/migrate/schema.go b/tavern/internal/ent/migrate/schema.go index 1858e7442..971ee5268 100644 --- a/tavern/internal/ent/migrate/schema.go +++ b/tavern/internal/ent/migrate/schema.go @@ -229,8 +229,8 @@ var ( {Name: "created_at", Type: field.TypeTime}, {Name: "last_modified_at", Type: field.TypeTime}, {Name: "url", Type: field.TypeString, Unique: true}, - {Name: "public_key", Type: field.TypeString}, - {Name: "private_key", Type: field.TypeString}, + {Name: "public_key", Type: field.TypeString, SchemaType: map[string]string{"mysql": "LONGTEXT"}}, + {Name: "private_key", Type: field.TypeString, SchemaType: map[string]string{"mysql": "LONGTEXT"}}, {Name: "repository_owner", Type: field.TypeInt, Nullable: true}, } // RepositoriesTable holds the schema information for the "repositories" table. diff --git a/tavern/internal/ent/schema/repository.go b/tavern/internal/ent/schema/repository.go index 19a9246fc..927935005 100644 --- a/tavern/internal/ent/schema/repository.go +++ b/tavern/internal/ent/schema/repository.go @@ -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" @@ -32,6 +33,9 @@ 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), ). @@ -39,6 +43,9 @@ func (Repository) Fields() []ent.Field { field.String("private_key"). NotEmpty(). Sensitive(). + SchemaType(map[string]string{ + dialect.MySQL: "LONGTEXT", // Override MySQL, improve length maximum + }). Annotations( entgql.Skip(entgql.SkipAll), ).