const { makeKyselyHook } = require("kanel-kysely");

const ignoredTables = [];

/** @type {import('kanel').Config} */
module.exports = {
  connection: {
    host: "localhost",
    user: "postgres",
    database: "postgres",
    password: "rootpost",
    port: 5432,
  },
  typeFilter: (pgType) => !ignoredTables.includes(pgType.name),
  preDeleteOutputFolder: true,
  outputPath: "./src/schemas",

  customTypeMap: {
    "pg_catalog.tsvector": "string",
    "pg_catalog.bpchar": "string",
    //"pg_catalog.json": "string",
  },
  preRenderHooks: [makeKyselyHook()],
};
