try to push : schema "XXX" does not exist

When I try to add a custom schema, the push command dont works :
export const quizSchema = pgSchema("quiz");

export const answerTypeEnum = quizSchema.enum("answer_type", ["single_choice", "multiple_choice", "boolean", "text", "number"]);

export const quizzes = quizSchema.table("quizzes", {
    id: integer().primaryKey().generatedByDefaultAsIdentity(),
    title: text("title").notNull(),
    iso_3166_1: varchar({ length: 2 }) // can be null, if provided, means the quiz is country-specific
}, (table) => [
    index("quizzes_iso_3166_1_index").on(table.iso_3166_1)
]);

I have this error :
$ drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/project/drizzle.config.ts'
Using 'pg' driver for database querying
[✓] Pulling schema from database...
error: schema "quiz" does not exist

any idea ?
Solution
okay ive found. I had to add schemaFilter: ['public', 'quiz'], in the drizzle.config.ts file
Was this page helpful?