{"id":"4a5a0ea2fa003ace","repo":"drizzle-team/drizzle-orm","slug":"you-can-t-use-full-name-generator-with-a-db-column","errorCode":null,"errorMessage":"You can't use full name generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxFirstNameLength + maxLastNameLength + 1}.","messagePattern":"You can't use full name generator with a db column length restriction of (.+?)\\. Set the maximum string length to at least (.+?)\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-seed/src/services/Generators.ts","lineNumber":1729,"sourceCode":"\nexport class GenerateFullName extends AbstractGenerator<{\n\tisUnique?: boolean;\n\tarraySize?: number;\n}> {\n\tstatic override readonly entityKind: string = 'GenerateFullName';\n\n\tprivate state: {\n\t\trng: prand.RandomGenerator;\n\t} | undefined;\n\toverride uniqueVersionOfGen = GenerateUniqueFullName;\n\n\toverride init({ count, seed }: { count: number; seed: number }) {\n\t\tsuper.init({ count, seed });\n\n\t\tconst rng = prand.xoroshiro128plus(seed);\n\n\t\tif (this.stringLength !== undefined && this.stringLength < (maxFirstNameLength + maxLastNameLength + 1)) {\n\t\t\tthrow new Error(\n\t\t\t\t`You can't use full name generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${\n\t\t\t\t\tmaxFirstNameLength + maxLastNameLength + 1\n\t\t\t\t}.`,\n\t\t\t);\n\t\t}\n\n\t\tthis.state = { rng };\n\t}\n\n\tgenerate() {\n\t\tif (this.state === undefined) {\n\t\t\tthrow new Error('state is not defined.');\n\t\t}\n\n\t\tlet idx: number;\n\n\t\t[idx, this.state.rng] = prand.uniformIntDistribution(0, firstNames.length - 1, this.state.rng);\n\t\tconst name = firstNames[idx] as string;","sourceCodeStart":1711,"sourceCodeEnd":1747,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-seed/src/services/Generators.ts#L1711-L1747","documentation":"Error \"You can't use full name generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxFirstNameLength + maxLastNameLength + 1}.\" thrown in drizzle-team/drizzle-orm.","triggerScenarios":"Using the full-name generator on a varchar column shorter than first+last+space maximum length.","commonSituations":"Undersized full-name column; set max length to at least maxFirstNameLength + maxLastNameLength + 1.","solutions":["Increase the column's maximum string length to at least first-name + last-name + 1 characters, or use a different generator."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b7862528fd8fc39bc2653a6c18dad7c1f4e68d10","analyzedAt":"2026-08-03T18:11:14.318Z","schemaVersion":2}