{ "version": "6", "dialect": "sqlite", "id": "58920b2c-2c0f-42b4-a675-2b30e03bd747", "prevId": "42b7d448-5f22-45aa-850d-dde77533d699", "tables": { "courses": { "name": "courses", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "subject": { "name": "subject", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'processing'" }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "lessons": { "name": "lessons", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "topic_id": { "name": "topic_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": {}, "foreignKeys": { "lessons_topic_id_topics_id_fk": { "name": "lessons_topic_id_topics_id_fk", "tableFrom": "lessons", "tableTo": "topics", "columnsFrom": [ "topic_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "quiz_questions": { "name": "quiz_questions", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "topic_id": { "name": "topic_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "question": { "name": "question", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "options": { "name": "options", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "answer": { "name": "answer", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "explanation": { "name": "explanation", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "quiz_questions_topic_id_topics_id_fk": { "name": "quiz_questions_topic_id_topics_id_fk", "tableFrom": "quiz_questions", "tableTo": "topics", "columnsFrom": [ "topic_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "topics": { "name": "topics", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "course_id": { "name": "course_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "order": { "name": "order", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "prerequisite_topic_ids": { "name": "prerequisite_topic_ids", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'[]'" }, "difficulty": { "name": "difficulty", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 1 } }, "indexes": {}, "foreignKeys": { "topics_course_id_courses_id_fk": { "name": "topics_course_id_courses_id_fk", "tableFrom": "topics", "tableTo": "courses", "columnsFrom": [ "course_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "uploads": { "name": "uploads", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "course_id": { "name": "course_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "filename": { "name": "filename", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "stored_path": { "name": "stored_path", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "extracted_text": { "name": "extracted_text", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": {}, "foreignKeys": { "uploads_course_id_courses_id_fk": { "name": "uploads_course_id_courses_id_fk", "tableFrom": "uploads", "tableTo": "courses", "columnsFrom": [ "course_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "user_progress": { "name": "user_progress", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "course_id": { "name": "course_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "topic_id": { "name": "topic_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "lesson_complete": { "name": "lesson_complete", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false }, "quiz_score": { "name": "quiz_score", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": {}, "foreignKeys": { "user_progress_course_id_courses_id_fk": { "name": "user_progress_course_id_courses_id_fk", "tableFrom": "user_progress", "tableTo": "courses", "columnsFrom": [ "course_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "user_progress_topic_id_topics_id_fk": { "name": "user_progress_topic_id_topics_id_fk", "tableFrom": "user_progress", "tableTo": "topics", "columnsFrom": [ "topic_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }