{"id":"108a5d51d8318fc8","repo":"drizzle-team/drizzle-orm","slug":"minvalue-and-maxvalue-should-be-the-same-type","errorCode":null,"errorMessage":"minValue and maxValue should be the same type.","messagePattern":"minValue and maxValue should be the same type\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-seed/src/services/Generators.ts","lineNumber":692,"sourceCode":"\n\t\tconst integersCount = new Map();\n\n\t\tif (typeof minValue === 'bigint' && typeof maxValue === 'bigint') {\n\t\t\tif (this.skipCheck === false && maxValue - minValue + BigInt(1) < count) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'count exceeds max number of unique integers in given range(min, max), try to make range wider.',\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (typeof minValue === 'number' && typeof maxValue === 'number') {\n\t\t\tminValue = minValue >= 0 ? Math.ceil(minValue) : Math.floor(minValue);\n\t\t\tmaxValue = maxValue >= 0 ? Math.floor(maxValue) : Math.ceil(maxValue);\n\t\t\tif (this.skipCheck === false && maxValue - minValue + 1 < count) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'count exceeds max number of unique integers in given range(min, max), try to make range wider.',\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\t'minValue and maxValue should be the same type.',\n\t\t\t);\n\t\t}\n\n\t\tthis.state = { rng, minValue, maxValue, intervals, integersCount };\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 intervalIdx: number,\n\t\t\tnumb: number | bigint | undefined;\n\n\t\tconst intervalsToAdd: (number | bigint)[][] = [];\n\n\t\tif (this.state.intervals.length === 0) {","sourceCodeStart":674,"sourceCodeEnd":710,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-seed/src/services/Generators.ts#L674-L710","documentation":"Error \"minValue and maxValue should be the same type.\" thrown in drizzle-team/drizzle-orm.","triggerScenarios":"Passing minValue and maxValue of different types (e.g. number vs bigint/string) to an int generator.","commonSituations":"Mixing number and bigint bounds; values parsed from config as strings.","solutions":["Pass minValue and maxValue of the same type (both numbers or both dates) to the generator."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b7862528fd8fc39bc2653a6c18dad7c1f4e68d10","analyzedAt":"2026-08-03T18:11:14.318Z","schemaVersion":2}