drizzle-team/drizzle-orm · error · Error
column with type ${col.baseColumn!.columnType} is not suppor
Error message
column with type ${col.baseColumn!.columnType} is not supported for now. What it means
In selectGeneratorForPostgresColumn, when a column is a Postgres array (columnType matches [/\[\w*]/]) with a defined baseColumn, the resolver recurses to find a generator for the base (element) type. If the base column type is unsupported and returns undefined, the array generator cannot be constructed and it throws.
Source
Thrown at drizzle-seed/src/services/SeedService.ts:515
}
return weightedWithCount;
};
// TODO: revise serial part generators
selectGeneratorForPostgresColumn = (
table: Table,
col: Column,
) => {
const pickGenerator = (table: Table, col: Column) => {
// ARRAY
if (col.columnType.match(/\[\w*]/g) !== null && col.baseColumn !== undefined) {
const baseColumnGen = this.selectGeneratorForPostgresColumn(
table,
col.baseColumn!,
) as AbstractGenerator;
if (baseColumnGen === undefined) {
throw new Error(`column with type ${col.baseColumn!.columnType} is not supported for now.`);
}
// const getBaseColumnDataType = (baseColumn: Column) => {
// if (baseColumn.baseColumn !== undefined) {
// return getBaseColumnDataType(baseColumn.baseColumn);
// }
// return baseColumn.dataType;
// };
// const baseColumnDataType = getBaseColumnDataType(col.baseColumn);
const generator = new generatorsMap.GenerateArray[0]({ baseColumnGen, size: col.size });
// generator.baseColumnDataType = baseColumnDataType;
return generator;
}
// ARRAY for studioView on GitHub (pinned to b7862528fd)
Solutions
- Provide a refinement generator for the array column so the auto-resolver is bypassed.
- Change the array's element type to a supported primitive (text, integer, etc.).
- Make the column nullable and leave it unrefined so it defaults to null.
Example fix
// before
keywords: customType('keywords').array()
// after — refine with a generator
refinements = {
myTable: {
columns: {
keywords: { generator: generators.array({ values: ['a','b','c'] }) }
}
}
}; Defensive patterns
Strategy: validation
Validate before calling
// Check whether a Postgres array column's base type is supported.
const SUPPORTED_SCALAR_TYPES = ['serial','integer','smallint','bigint','varchar','text','boolean','date','timestamp','numeric','real','double','json','jsonb','uuid','interval'];
function isArrayBaseSupported(columnType: string): boolean {
if (!columnType.match(/\[\w*\]/)) return true; // not an array
const baseType = columnType.replace(/\[\w*\]/g, '');
return SUPPORTED_SCALAR_TYPES.some((t) => baseType.includes(t));
}
// If false, supply a refinement generator for the column. Prevention
- Use arrays of standard scalar types (text[], integer[]) for seedable columns.
- Provide refinement generators for arrays of custom or exotic types.
- Make unsupported array columns nullable so they default to null.
When it happens
Trigger: A Postgres array column whose element type has no generator (e.g. tsvector[], custom_type[], bit varying[]) and no refinement is supplied for the column.
Common situations: Schema with typed arrays of exotic Postgres types; using array of a UDT or domain that drizzle-seed cannot resolve.
Related errors
- for now you can't specify generators for columns of dimensio
- No transactions support in neon-http driver
- crudPolicy requires a read policy
- crudPolicy requires a modify policy
- Unsupported geometry type
AI-assisted analysis of drizzle-team/drizzle-orm@b7862528fd (2026-08-03).
Data as JSON: /data/errors/d7333cd1855ede99.json.
Report an issue: GitHub.