Drizzle ORM - Query on the same file
const users = (name: string) => pgSchema(name).table('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
invitedBy: integer('invited_by').references((): AnyPgColumn => users.id),
});
const db = drizzle({ users("tenant_1") });
await db.query.users.findMany(...);
typescript doesn't pop up "users" when i try to type " db.query. " .
i am buiding multi-tenant with the same database but difference schema.
please help me !!! thanks alot !!!
1 Reply
It does for me. Maybe you can share more details on your tsconfig / drizzleorm version?