{"record":{"id":"db5718c7372b27c1","repo":"n8n-io/n8n","slug":"database-type-currently-not-supported","errorCode":null,"errorMessage":"Database type currently not supported","messagePattern":"Database type currently not supported","errorType":"validation","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/db/src/connection/db-connection-options.ts","lineNumber":42,"sourceCode":"\tgetPostgresOverrides() {\n\t\treturn {\n\t\t\tdatabase: this.config.postgresdb.database,\n\t\t\thost: this.config.postgresdb.host,\n\t\t\tport: this.config.postgresdb.port,\n\t\t\tusername: this.config.postgresdb.user,\n\t\t\tpassword: this.config.postgresdb.password,\n\t\t};\n\t}\n\n\tgetOptions(): DataSourceOptions {\n\t\tconst { type: dbType } = this.config;\n\t\tswitch (dbType) {\n\t\t\tcase 'sqlite':\n\t\t\t\treturn this.getSqliteConnectionOptions();\n\t\t\tcase 'postgresdb':\n\t\t\t\treturn this.getPostgresConnectionOptions();\n\t\t\tdefault:\n\t\t\t\tthrow new UserError('Database type currently not supported', { extra: { dbType } });\n\t\t}\n\t}\n\n\tprivate getCommonOptions() {\n\t\tconst { tablePrefix: entityPrefix, logging: loggingConfig } = this.config;\n\n\t\tlet loggingOption: LoggerOptions = loggingConfig.enabled;\n\t\tif (loggingOption) {\n\t\t\tconst optionsString = loggingConfig.options.replace(/\\s+/g, '');\n\t\t\tif (optionsString === 'all') {\n\t\t\t\tloggingOption = optionsString;\n\t\t\t} else {\n\t\t\t\tloggingOption = optionsString.split(',') as LoggerOptions;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tentityPrefix,","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/db/src/connection/db-connection-options.ts#L24-L60","documentation":"UserError thrown by DbConnectionOptions.getOptions() when config.DB_TYPE is neither 'sqlite' nor 'postgresdb'. The switch has only those two cases; any other value (or an unset/misspelled type) hits the default and rejects with extra.dbType attached. UserError indicates the user caused it via configuration.","triggerScenarios":"Setting DB_TYPE to an unsupported value (e.g. 'mysql', 'mongodb', 'mariadb'), misspelling it ('postgres', 'PSQL'), or leaving it unset so it falls through to a non-matching default. Triggered at boot when DataSource options are constructed.","commonSituations":"Copy-pasting a connection string from a MySQL project; assuming n8n supports MariaDB/MySQL (it does not — only sqlite and postgres); a CI env with DB_TYPE inherited from a different service; case sensitivity ('PostgresDB' vs 'postgresdb').","solutions":["Set DB_TYPE to exactly 'sqlite' or 'postgresdb' (lowercase) in your env/config.","If you need Postgres, also set DB_POSTGRESDB_HOST, _PORT, _USER, _PASSWORD, _DATABASE.","For local dev/CI, use 'sqlite' (default) with DB_SQLITE_FILENAME.","Double-check the env var name is DB_TYPE (not DATABASE_TYPE or similar) to avoid a silent default."],"exampleFix":"// before\nDB_TYPE=mysql\n\n// after\nDB_TYPE=postgresdb","handlingStrategy":"validation","validationCode":"const allowed = new Set(['sqlite', 'postgresdb']);\nif (!allowed.has(process.env.DB_TYPE ?? 'sqlite')) {\n  throw new Error(`Unsupported DB_TYPE '${process.env.DB_TYPE}'. Use 'sqlite' or 'postgresdb'.`);\n}","typeGuard":"function isSupportedDbType(value: string): value is 'sqlite' | 'postgresdb' {\n  return value === 'sqlite' || value === 'postgresdb';\n}","tryCatchPattern":null,"preventionTips":["Pin DB_TYPE in config-as-code so it can't drift to an unsupported value.","Document explicitly that only sqlite and postgresdb are supported.","Add a startup assertion on DB_TYPE before the app boots."],"tags":["config","database","startup","validation"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}