27 lines
627 B
JavaScript
27 lines
627 B
JavaScript
const { makeKyselyHook } = require("kanel-kysely");
|
|
|
|
const ignoredTables = ["schema_migrations"];
|
|
|
|
/** @type {import('kanel').Config} */
|
|
module.exports = {
|
|
connection: {
|
|
host: "localhost",
|
|
user: "postgres",
|
|
database: "postgres",
|
|
password: "rootpost",
|
|
port: 5433,
|
|
},
|
|
|
|
typeFilter: (pgType) => !ignoredTables.includes(pgType.name),
|
|
preDeleteOutputFolder: true,
|
|
outputPath: "./src/schemas",
|
|
|
|
customTypeMap: {
|
|
"pg_catalog.tsvector": "string",
|
|
"pg_catalog.bpchar": "string",
|
|
'pg_catalog.numeric': 'number',
|
|
//"pg_catalog.json": "string",
|
|
},
|
|
preRenderHooks: [makeKyselyHook()],
|
|
|
|
};
|