Seems like the schema generic is missing - did you forget to add it to your DB type?

Hi, I am trying to use Drizzle in a multischema setup. The docs say to make the config and then create the db adapter. I would assume that the folder I set as schema in drizzle.config.ts would automatically pass it to the db client. But I get
Seems like the schema generic is missing - did you forget to add it to your DB type?
. Do I have to explicitly define all the schemas I'm using in the db client like: export const database = drizzle(sqlite, {schema1, schema2}) , or is there something wrong? The way it seems in the setup for the docs, all I need is to define the schema folder and the db() should gather the types from it automatically.

import { defineConfig } from "drizzle-kit";

export default defineConfig({
    schema: "./src/db/schema",
    out: "./src/db/migrations",
    dialect: "postgresql",
    dbCredentials: {
        url: process.env.DATABASE_URL || "",
    },
});
Was this page helpful?