From 01a0dff53e93811e8909a7b3f1a301fdc3b9e766 Mon Sep 17 00:00:00 2001 From: ImBenji Date: Tue, 28 Apr 2026 00:53:34 +0100 Subject: [PATCH] initialize project with basic structure and dependencies --- ...0000_curved_aqueduct.sql => 0000_init.sql} | 60 ++- drizzle/0001_nervous_the_fury.sql | 1 - drizzle/0002_special_korg.sql | 1 - drizzle/0003_adhd_mode_audio.sql | 1 - drizzle/0004_adhd_mode_audio_chunks.sql | 1 - drizzle/0005_cost_ai.sql | 1 - drizzle/0006_cost_audio.sql | 1 - drizzle/0007_branch_took.sql | 1 - drizzle/0008_branch_count.sql | 1 - drizzle/0009_audit_report.sql | 1 - drizzle/0010_audit_score.sql | 1 - drizzle/0011_tts_provider.sql | 1 - drizzle/0012_organisation.sql | 1 - drizzle/0013_relevant_files.sql | 1 - drizzle/0014_jit_lessons.sql | 7 - drizzle/meta/0000_snapshot.json | 414 ----------------- drizzle/meta/0001_snapshot.json | 421 ----------------- drizzle/meta/0002_snapshot.json | 428 ------------------ drizzle/meta/_journal.json | 102 +---- 19 files changed, 41 insertions(+), 1404 deletions(-) rename drizzle/{0000_curved_aqueduct.sql => 0000_init.sql} (78%) delete mode 100644 drizzle/0001_nervous_the_fury.sql delete mode 100644 drizzle/0002_special_korg.sql delete mode 100644 drizzle/0003_adhd_mode_audio.sql delete mode 100644 drizzle/0004_adhd_mode_audio_chunks.sql delete mode 100644 drizzle/0005_cost_ai.sql delete mode 100644 drizzle/0006_cost_audio.sql delete mode 100644 drizzle/0007_branch_took.sql delete mode 100644 drizzle/0008_branch_count.sql delete mode 100644 drizzle/0009_audit_report.sql delete mode 100644 drizzle/0010_audit_score.sql delete mode 100644 drizzle/0011_tts_provider.sql delete mode 100644 drizzle/0012_organisation.sql delete mode 100644 drizzle/0013_relevant_files.sql delete mode 100644 drizzle/0014_jit_lessons.sql delete mode 100644 drizzle/meta/0000_snapshot.json delete mode 100644 drizzle/meta/0001_snapshot.json delete mode 100644 drizzle/meta/0002_snapshot.json diff --git a/drizzle/0000_curved_aqueduct.sql b/drizzle/0000_init.sql similarity index 78% rename from drizzle/0000_curved_aqueduct.sql rename to drizzle/0000_init.sql index 83e4059..7f85813 100644 --- a/drizzle/0000_curved_aqueduct.sql +++ b/drizzle/0000_init.sql @@ -3,13 +3,50 @@ CREATE TABLE `courses` ( `title` text NOT NULL, `subject` text NOT NULL, `status` text DEFAULT 'processing' NOT NULL, + `stage` text, + `cost_ai` real DEFAULT 0, + `cost_audio` real DEFAULT 0, + `audit_report` text, + `audit_score` integer, + `organisation` text, `created_at` text DEFAULT (datetime('now')) NOT NULL ); --> statement-breakpoint +CREATE TABLE `uploads` ( + `id` text PRIMARY KEY NOT NULL, + `course_id` text NOT NULL, + `filename` text NOT NULL, + `type` text NOT NULL, + `stored_path` text NOT NULL, + `extracted_text` text, + `created_at` text DEFAULT (datetime('now')) NOT NULL, + FOREIGN KEY (`course_id`) REFERENCES `courses`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `topics` ( + `id` text PRIMARY KEY NOT NULL, + `course_id` text NOT NULL, + `title` text NOT NULL, + `description` text NOT NULL, + `order` integer NOT NULL, + `prerequisite_topic_ids` text DEFAULT '[]' NOT NULL, + `difficulty` integer DEFAULT 1 NOT NULL, + `relevant_files` text, + `status` text DEFAULT 'pending' NOT NULL, + FOREIGN KEY (`course_id`) REFERENCES `courses`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint CREATE TABLE `lessons` ( `id` text PRIMARY KEY NOT NULL, `topic_id` text NOT NULL, `content` text NOT NULL, + `tts_provider` text, + `cost_ai` real DEFAULT 0, + `cost_audio` real DEFAULT 0, + `cost_branch_ai` real DEFAULT 0, + `cost_branch_audio` real DEFAULT 0, + `cost_total` real DEFAULT 0, + `branch_status` text DEFAULT 'pending' NOT NULL, `created_at` text DEFAULT (datetime('now')) NOT NULL, FOREIGN KEY (`topic_id`) REFERENCES `topics`(`id`) ON UPDATE no action ON DELETE no action ); @@ -25,33 +62,14 @@ CREATE TABLE `quiz_questions` ( FOREIGN KEY (`topic_id`) REFERENCES `topics`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint -CREATE TABLE `topics` ( - `id` text PRIMARY KEY NOT NULL, - `course_id` text NOT NULL, - `title` text NOT NULL, - `description` text NOT NULL, - `order` integer NOT NULL, - `prerequisite_topic_ids` text DEFAULT '[]' NOT NULL, - `difficulty` integer DEFAULT 1 NOT NULL, - FOREIGN KEY (`course_id`) REFERENCES `courses`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -CREATE TABLE `uploads` ( - `id` text PRIMARY KEY NOT NULL, - `course_id` text NOT NULL, - `filename` text NOT NULL, - `type` text NOT NULL, - `stored_path` text NOT NULL, - `created_at` text DEFAULT (datetime('now')) NOT NULL, - FOREIGN KEY (`course_id`) REFERENCES `courses`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint CREATE TABLE `user_progress` ( `id` text PRIMARY KEY NOT NULL, `course_id` text NOT NULL, `topic_id` text NOT NULL, `lesson_complete` integer DEFAULT false NOT NULL, `quiz_score` integer, + `took_branches` integer DEFAULT false NOT NULL, + `branch_count` integer DEFAULT 0 NOT NULL, `updated_at` text DEFAULT (datetime('now')) NOT NULL, FOREIGN KEY (`course_id`) REFERENCES `courses`(`id`) ON UPDATE no action ON DELETE no action, FOREIGN KEY (`topic_id`) REFERENCES `topics`(`id`) ON UPDATE no action ON DELETE no action diff --git a/drizzle/0001_nervous_the_fury.sql b/drizzle/0001_nervous_the_fury.sql deleted file mode 100644 index 15c47cc..0000000 --- a/drizzle/0001_nervous_the_fury.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `uploads` ADD `extracted_text` text; \ No newline at end of file diff --git a/drizzle/0002_special_korg.sql b/drizzle/0002_special_korg.sql deleted file mode 100644 index 07677b0..0000000 --- a/drizzle/0002_special_korg.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `courses` ADD `stage` text; \ No newline at end of file diff --git a/drizzle/0003_adhd_mode_audio.sql b/drizzle/0003_adhd_mode_audio.sql deleted file mode 100644 index 944c27e..0000000 --- a/drizzle/0003_adhd_mode_audio.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `lessons` ADD `audio_path` text; diff --git a/drizzle/0004_adhd_mode_audio_chunks.sql b/drizzle/0004_adhd_mode_audio_chunks.sql deleted file mode 100644 index 828eb15..0000000 --- a/drizzle/0004_adhd_mode_audio_chunks.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `lessons` ADD `audio_chunks` text; diff --git a/drizzle/0005_cost_ai.sql b/drizzle/0005_cost_ai.sql deleted file mode 100644 index 497deec..0000000 --- a/drizzle/0005_cost_ai.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `courses` ADD `cost_ai` real DEFAULT 0; diff --git a/drizzle/0006_cost_audio.sql b/drizzle/0006_cost_audio.sql deleted file mode 100644 index bb0df54..0000000 --- a/drizzle/0006_cost_audio.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `courses` ADD `cost_audio` real DEFAULT 0; diff --git a/drizzle/0007_branch_took.sql b/drizzle/0007_branch_took.sql deleted file mode 100644 index bfb2fdf..0000000 --- a/drizzle/0007_branch_took.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE user_progress ADD COLUMN took_branches INTEGER NOT NULL DEFAULT 0; diff --git a/drizzle/0008_branch_count.sql b/drizzle/0008_branch_count.sql deleted file mode 100644 index 8ec4e1c..0000000 --- a/drizzle/0008_branch_count.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE user_progress ADD COLUMN branch_count INTEGER NOT NULL DEFAULT 0; diff --git a/drizzle/0009_audit_report.sql b/drizzle/0009_audit_report.sql deleted file mode 100644 index ee6da4e..0000000 --- a/drizzle/0009_audit_report.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE courses ADD COLUMN audit_report TEXT; diff --git a/drizzle/0010_audit_score.sql b/drizzle/0010_audit_score.sql deleted file mode 100644 index 2aeb932..0000000 --- a/drizzle/0010_audit_score.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE courses ADD COLUMN audit_score INTEGER; diff --git a/drizzle/0011_tts_provider.sql b/drizzle/0011_tts_provider.sql deleted file mode 100644 index 6dfec29..0000000 --- a/drizzle/0011_tts_provider.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `lessons` ADD `tts_provider` text; diff --git a/drizzle/0012_organisation.sql b/drizzle/0012_organisation.sql deleted file mode 100644 index d7e7bff..0000000 --- a/drizzle/0012_organisation.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `courses` ADD `organisation` text; diff --git a/drizzle/0013_relevant_files.sql b/drizzle/0013_relevant_files.sql deleted file mode 100644 index 9ab1ece..0000000 --- a/drizzle/0013_relevant_files.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `topics` ADD `relevant_files` text; diff --git a/drizzle/0014_jit_lessons.sql b/drizzle/0014_jit_lessons.sql deleted file mode 100644 index 4b95f6d..0000000 --- a/drizzle/0014_jit_lessons.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `topics` ADD `status` text DEFAULT 'pending' NOT NULL; -ALTER TABLE `lessons` ADD `cost_ai` real DEFAULT 0; -ALTER TABLE `lessons` ADD `cost_audio` real DEFAULT 0; -ALTER TABLE `lessons` ADD `cost_branch_ai` real DEFAULT 0; -ALTER TABLE `lessons` ADD `cost_branch_audio` real DEFAULT 0; -ALTER TABLE `lessons` ADD `cost_total` real DEFAULT 0; -ALTER TABLE `lessons` ADD `branch_status` text DEFAULT 'pending' NOT NULL; diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json deleted file mode 100644 index a9bc4d0..0000000 --- a/drizzle/meta/0000_snapshot.json +++ /dev/null @@ -1,414 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "42b7d448-5f22-45aa-850d-dde77533d699", - "prevId": "00000000-0000-0000-0000-000000000000", - "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 - }, - "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": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json deleted file mode 100644 index 9cb2bee..0000000 --- a/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,421 +0,0 @@ -{ - "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": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json deleted file mode 100644 index f9fbeb9..0000000 --- a/drizzle/meta/0002_snapshot.json +++ /dev/null @@ -1,428 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "85b190a4-a50e-4a71-a0df-ac5c1ac5c869", - "prevId": "58920b2c-2c0f-42b4-a675-2b30e03bd747", - "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'" - }, - "stage": { - "name": "stage", - "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": {}, - "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": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index c093ed4..df6416a 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -6,106 +6,8 @@ "idx": 0, "version": "6", "when": 1777109155026, - "tag": "0000_curved_aqueduct", - "breakpoints": true - }, - { - "idx": 1, - "version": "6", - "when": 1777110758287, - "tag": "0001_nervous_the_fury", - "breakpoints": true - }, - { - "idx": 2, - "version": "6", - "when": 1777111595079, - "tag": "0002_special_korg", - "breakpoints": true - }, - { - "idx": 3, - "version": "6", - "when": 1777200000000, - "tag": "0003_adhd_mode_audio", - "breakpoints": true - }, - { - "idx": 4, - "version": "6", - "when": 1777200000001, - "tag": "0004_adhd_mode_audio_chunks", - "breakpoints": true - }, - { - "idx": 5, - "version": "6", - "when": 1777200000002, - "tag": "0005_cost_ai", - "breakpoints": true - }, - { - "idx": 6, - "version": "6", - "when": 1777200000003, - "tag": "0006_cost_audio", - "breakpoints": true - }, - { - "idx": 7, - "version": "6", - "when": 1777200000004, - "tag": "0007_branch_took", - "breakpoints": true - }, - { - "idx": 8, - "version": "6", - "when": 1777200000005, - "tag": "0008_branch_count", - "breakpoints": true - }, - { - "idx": 9, - "version": "6", - "when": 1777200000006, - "tag": "0009_audit_report", - "breakpoints": true - }, - { - "idx": 10, - "version": "6", - "when": 1777200000007, - "tag": "0010_audit_score", - "breakpoints": true - }, - { - "idx": 11, - "version": "6", - "when": 1777200000008, - "tag": "0011_tts_provider", - "breakpoints": true - }, - { - "idx": 12, - "version": "6", - "when": 1777200000009, - "tag": "0012_organisation", - "breakpoints": true - }, - { - "idx": 13, - "version": "6", - "when": 1777200000010, - "tag": "0013_relevant_files", - "breakpoints": true - }, - { - "idx": 14, - "version": "6", - "when": 1777200000011, - "tag": "0014_jit_lessons", + "tag": "0000_init", "breakpoints": true } ] -} \ No newline at end of file +}