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)
]);
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)
]);