No activities found matching your filters.
diff --git a/migrations/0006_add_course_materials.sql b/migrations/0006_add_course_materials.sql new file mode 100644 index 0000000..08d3b60 --- /dev/null +++ b/migrations/0006_add_course_materials.sql @@ -0,0 +1,17 @@ +-- Migration 0006: Add course_materials table for activity file attachments + +CREATE TABLE IF NOT EXISTS course_materials ( + id TEXT PRIMARY KEY, + activity_id TEXT NOT NULL, + title TEXT NOT NULL, + description TEXT, + file_key TEXT NOT NULL, + uploaded_by TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now')), + FOREIGN KEY (activity_id) REFERENCES activities(id) ON DELETE CASCADE, + FOREIGN KEY (uploaded_by) REFERENCES users(id) ON DELETE SET NULL +); + +CREATE INDEX IF NOT EXISTS idx_materials_activity ON course_materials(activity_id); +CREATE INDEX IF NOT EXISTS idx_materials_uploader ON course_materials(uploaded_by); +CREATE INDEX IF NOT EXISTS idx_materials_created ON course_materials(activity_id, created_at DESC); diff --git a/public/activity.html b/public/activity.html index 5dde4c0..a29781a 100644 --- a/public/activity.html +++ b/public/activity.html @@ -9,73 +9,77 @@ @@ -86,27 +90,21 @@
Browse courses, meetups, workshops, and study groups. All sessions encrypted and secure.
- -No activities found matching your filters.