{"record":{"id":"3251a9ef31bf80fe","repo":"n8n-io/n8n","slug":"data-type-type-in-column-entitymetadata-ta","errorCode":null,"errorMessage":"Data type \"${type}\" in \"${column.entityMetadata.targetName}.${column.propertyName}\" is not supported by \"${database}\" database.","messagePattern":"Data type \"(.+?)\" in \"(.+?)\\.(.+?)\" is not supported by \"(.+?)\" database\\.","errorType":"exception","errorClass":"DataTypeNotSupportedError","httpStatus":null,"severity":"critical","filePath":"packages/@n8n/typeorm/src/metadata-builder/EntityMetadataValidator.ts","lineNumber":114,"sourceCode":"\t\t\tif (sameDiscriminatorValueEntityMetadata)\n\t\t\t\tthrow new TypeORMError(\n\t\t\t\t\t`Entities ${entityMetadata.name} and ${sameDiscriminatorValueEntityMetadata.name} have the same discriminator values. Make sure they are different while using the @ChildEntity decorator.`,\n\t\t\t\t);\n\t\t}\n\n\t\tentityMetadata.relationCounts.forEach((relationCount) => {\n\t\t\tif (relationCount.relation.isManyToOne || relationCount.relation.isOneToOne)\n\t\t\t\tthrow new TypeORMError(\n\t\t\t\t\t`Relation count can not be implemented on ManyToOne or OneToOne relations.`,\n\t\t\t\t);\n\t\t});\n\n\t\tentityMetadata.columns\n\t\t\t.filter((column) => !column.isVirtualProperty)\n\t\t\t.forEach((column) => {\n\t\t\t\tconst normalizedColumn = driver.normalizeType(column) as ColumnType;\n\t\t\t\tif (driver.supportedDataTypes.indexOf(normalizedColumn) === -1)\n\t\t\t\t\tthrow new DataTypeNotSupportedError(column, normalizedColumn, driver.options.type);\n\t\t\t\tif (column.length && driver.withLengthColumnTypes.indexOf(normalizedColumn) === -1)\n\t\t\t\t\tthrow new TypeORMError(\n\t\t\t\t\t\t`Column ${column.propertyName} of Entity ${entityMetadata.name} does not support length property.`,\n\t\t\t\t\t);\n\t\t\t\tif (column.type === 'enum' && !column.enum && !column.enumName)\n\t\t\t\t\tthrow new TypeORMError(\n\t\t\t\t\t\t`Column \"${column.propertyName}\" of Entity \"${entityMetadata.name}\" is defined as enum, but missing \"enum\" or \"enumName\" properties.`,\n\t\t\t\t\t);\n\t\t\t});\n\n\t\t// Postgres supports only STORED generated columns.\n\t\tif (driver.options.type === 'postgres') {\n\t\t\tconst virtualColumn = entityMetadata.columns.find(\n\t\t\t\t(column) =>\n\t\t\t\t\tcolumn.asExpression && (!column.generatedType || column.generatedType === 'VIRTUAL'),\n\t\t\t);\n\t\t\tif (virtualColumn)\n\t\t\t\tthrow new TypeORMError(","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/typeorm/src/metadata-builder/EntityMetadataValidator.ts#L96-L132","documentation":"Thrown by EntityMetadataValidator.validate via DataTypeNotSupportedError when a non-virtual @Column's normalized type is not present in driver.supportedDataTypes for the configured database. The validator filters out virtual properties, calls driver.normalizeType(column), and if indexOf === -1 throws naming the type, the entity.property, and the database.","triggerScenarios":"Declaring a column with a type the active driver cannot map (e.g. 'hstore' on sqlite, 'mediumint' on postgres, an enum-array type on a driver that does not support it).","commonSituations":"Switching the database type (sqlite <-> postgres <-> mysql) without auditing column types; copying an entity from a MySQL project into a SQLite test setup; using a driver-specific type name that does not match TypeORM's normalized set.","solutions":["Replace the column type with one present in driver.supportedDataTypes for your database (consult the TypeORM column-types table).","For driver-specific features, use a typed @Column with the canonical TypeORM alias (e.g. 'simple-array', 'json', 'uuid').","Keep test-suite entities on types supported by every driver you target in CI."],"exampleFix":"// before (on sqlite)\n@Column({ type: 'hstore' }) metadata: Record<string, string>;\n\n// after\n@Column({ type: 'simple-json' }) metadata: Record<string, string>;","handlingStrategy":"validation","validationCode":"function assertColumnTypesSupported(dataSource: DataSource): string[] {\n  const supported = new Set(dataSource.driver.supportedDataTypes as string[]);\n  const problems: string[] = [];\n  for (const meta of dataSource.entityMetadatas) {\n    for (const col of meta.columns.filter((c) => !c.isVirtualProperty)) {\n      const norm = dataSource.driver.normalizeType(col) as string;\n      if (!supported.has(norm)) {\n        problems.push(`${meta.targetName}.${col.propertyName} type '${norm}' not supported by ${dataSource.options.type}`);\n      }\n    }\n  }\n  return problems;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await dataSource.initialize();\n} catch (err) {\n  if (err.message.includes('is not supported by') && err.message.includes('database')) {\n    // swap the column type for one in driver.supportedDataTypes\n  }\n  throw err;\n}","preventionTips":["Pin entity column types to the canonical TypeORM aliases present in supportedDataTypes for every driver you target.","Boot a DataSource per driver in CI so unsupported types fail the build, not staging.","Keep driver-specific types behind feature flags or per-driver entity overrides."],"tags":["column-type","driver","datatype","startup"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}