UI improved

This commit is contained in:
Harwinder Sekhon
2026-07-27 13:58:47 -04:00
parent 45e7465f7b
commit c4c88e52da
11 changed files with 3257 additions and 412 deletions
+22 -8
View File
@@ -9,17 +9,31 @@ CREATE TABLE IF NOT EXISTS users (
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;
-- Small key/value store for app-wide facts (currently: when the last scan ran).
CREATE TABLE IF NOT EXISTS app_meta (
k VARCHAR(64) PRIMARY KEY,
v VARCHAR(255) NOT NULL,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
-- One row per directory found under VIDEOS_ROOT.
-- `path` is the relative path from VIDEOS_ROOT, e.g. "Course 1/Intro".
-- thumbnail_video_id/thumbnail_generated_at are only ever set on top-level
-- (course) folders — see generateThumbnails() — and have no FK to videos
-- (that would make folders<->videos a circular reference); a stale pointer
-- is harmless and self-corrects on the next scan.
CREATE TABLE IF NOT EXISTS folders (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
parent_id INT UNSIGNED NULL,
name VARCHAR(255) NOT NULL,
path VARCHAR(700) NOT NULL UNIQUE,
depth INT UNSIGNED NOT NULL DEFAULT 0,
sort_order INT UNSIGNED NOT NULL DEFAULT 0,
is_missing TINYINT(1) NOT NULL DEFAULT 0,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
parent_id INT UNSIGNED NULL,
name VARCHAR(255) NOT NULL,
path VARCHAR(700) NOT NULL UNIQUE,
depth INT UNSIGNED NOT NULL DEFAULT 0,
sort_order INT UNSIGNED NOT NULL DEFAULT 0,
is_missing TINYINT(1) NOT NULL DEFAULT 0,
thumbnail_video_id INT UNSIGNED NULL,
thumbnail_generated_at TIMESTAMP NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT fk_folders_parent FOREIGN KEY (parent_id)
REFERENCES folders(id) ON DELETE CASCADE,
INDEX idx_folders_parent (parent_id)