diff --git a/libs/contract/commands/hosts/create.command.ts b/libs/contract/commands/hosts/create.command.ts index c886dcf5..556312f3 100644 --- a/libs/contract/commands/hosts/create.command.ts +++ b/libs/contract/commands/hosts/create.command.ts @@ -31,9 +31,6 @@ export namespace CreateHostCommand { }) .min(1, { message: 'Remark must be at least 1 character', - }) - .max(40, { - message: 'Remark must be less than 40 characters', }), address: z.string({ diff --git a/libs/contract/commands/hosts/update.command.ts b/libs/contract/commands/hosts/update.command.ts index c1b8eb93..b6cc7d2b 100644 --- a/libs/contract/commands/hosts/update.command.ts +++ b/libs/contract/commands/hosts/update.command.ts @@ -33,9 +33,6 @@ export namespace UpdateHostCommand { .string({ invalid_type_error: 'Remark must be a string', }) - .max(40, { - message: 'Remark must be less than 40 characters', - }) .optional(), address: z .string({ diff --git a/prisma/migrations/20260520223000_remove_host_remark_limit/migration.sql b/prisma/migrations/20260520223000_remove_host_remark_limit/migration.sql new file mode 100644 index 00000000..8de4daf6 --- /dev/null +++ b/prisma/migrations/20260520223000_remove_host_remark_limit/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "hosts" + ALTER COLUMN "remark" SET DATA TYPE TEXT; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 5f67243c..bc909573 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -259,7 +259,7 @@ model NodesUsageHistory { model Hosts { uuid String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid viewPosition Int @default(autoincrement()) @map("view_position") - remark String @map("remark") @db.VarChar(50) + remark String @map("remark") address String @map("address") port Int @map("port") path String? @map("path")