{"id":"5ac319534c17655b","repo":"drizzle-team/drizzle-orm","slug":"count-exceeds-max-number-for-this-column-type","errorCode":null,"errorMessage":"count exceeds max number for this column type.","messagePattern":"count exceeds max number for this column type\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-seed/src/services/Generators.ts","lineNumber":451,"sourceCode":"\n\t\tif (i < this.state.firstValuesCount) {\n\t\t\tthis.state.firstValues.push(values[i]!);\n\t\t\treturn values[i];\n\t\t} else {\n\t\t\t[idx, this.state.rng] = prand.uniformIntDistribution(0, this.state.firstValues.length - 1, this.state.rng);\n\t\t\treturn this.state.firstValues[idx];\n\t\t}\n\t}\n}\n\nexport class GenerateIntPrimaryKey extends AbstractGenerator<{}> {\n\tstatic override readonly entityKind: string = 'GenerateIntPrimaryKey';\n\n\tpublic maxValue?: number | bigint;\n\n\toverride init({ count }: { count: number; seed: number }) {\n\t\tif (this.maxValue !== undefined && count > this.maxValue) {\n\t\t\tthrow new Error('count exceeds max number for this column type.');\n\t\t}\n\t}\n\n\tgenerate({ i }: { i: number }) {\n\t\tif (this.dataType === 'bigint') {\n\t\t\treturn BigInt(i + 1);\n\t\t}\n\n\t\treturn i + 1;\n\t}\n}\n\nexport class GenerateNumber extends AbstractGenerator<\n\t{\n\t\tminValue?: number;\n\t\tmaxValue?: number;\n\t\tprecision?: number;\n\t\tisUnique?: boolean;","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-seed/src/services/Generators.ts#L433-L469","documentation":"Error \"count exceeds max number for this column type.\" thrown in drizzle-team/drizzle-orm.","triggerScenarios":"Requesting a generation count that exceeds the maximum number of distinct values the column type supports.","commonSituations":"Seeding more rows than a boolean/small-range/short-string column can uniquely produce.","solutions":["Lower the requested count or choose a generator/column type with a larger value domain."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b7862528fd8fc39bc2653a6c18dad7c1f4e68d10","analyzedAt":"2026-08-03T18:11:14.318Z","schemaVersion":2}