{"id":"eb17381d8f78c5f6","repo":"drizzle-team/drizzle-orm","slug":"you-can-t-use-street-address-generator-with-a-db-c","errorCode":null,"errorMessage":"You can't use street address generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxStreetAddressLength}.","messagePattern":"You can't use street address generator with a db column length restriction of (.+?)\\. Set the maximum string length to at least (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-seed/src/services/Generators.ts","lineNumber":2214,"sourceCode":"\tarraySize?: number;\n}> {\n\tstatic override readonly entityKind: string = 'GenerateStreetAddress';\n\n\tprivate state: {\n\t\trng: prand.RandomGenerator;\n\t\tpossStreetNames: string[][];\n\t} | undefined;\n\toverride uniqueVersionOfGen = GenerateUniqueStreetAddress;\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\t\tconst possStreetNames = [firstNames, lastNames];\n\n\t\tconst maxStreetAddressLength = 4 + Math.max(maxFirstNameLength, maxLastNameLength) + 1 + maxStreetSuffixLength;\n\t\tif (this.stringLength !== undefined && this.stringLength < maxStreetAddressLength) {\n\t\t\tthrow new Error(\n\t\t\t\t`You can't use street address generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxStreetAddressLength}.`,\n\t\t\t);\n\t\t}\n\n\t\tthis.state = { rng, possStreetNames };\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, streetBaseNameIdx, streetSuffixIdx, streetNumber;\n\t\t[idx, this.state.rng] = prand.uniformIntDistribution(0, this.state.possStreetNames.length - 1, this.state.rng);\n\n\t\t[streetBaseNameIdx, this.state.rng] = prand.uniformIntDistribution(\n\t\t\t0,\n\t\t\tthis.state.possStreetNames[idx]!.length - 1,","sourceCodeStart":2196,"sourceCodeEnd":2232,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-seed/src/services/Generators.ts#L2196-L2232","documentation":"Error \"You can't use street address generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxStreetAddressLength}.\" thrown in drizzle-team/drizzle-orm.","triggerScenarios":"Using the street-address generator on a column shorter than the longest street address.","commonSituations":"Short varchar for addresses; raise to maxStreetAddressLength.","solutions":["Increase the column's maximum string length to at least the maximum street-address length, 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}