We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb4dfac commit cff72bdCopy full SHA for cff72bd
src/index.ts
@@ -9,6 +9,11 @@ import type { AnyDrizzleDB, GeneratedData } from './types';
9
10
export const buildSchema = <TDbClient extends AnyDrizzleDB<any>>(db: TDbClient): GeneratedData<TDbClient> => {
11
const schema = db._.fullSchema;
12
+ if (!schema) {
13
+ throw new Error(
14
+ "Schema not found in drizzle instance. Make sure you're using drizzle-orm v0.30.9 or above and schema is passed to drizzle constructor!",
15
+ );
16
+ }
17
18
let generatorOutput;
19
if (is(db, MySqlDatabase)) {
0 commit comments