-- ═══════════════════════════════════════════════════════════════ -- 048 FILES IN GOOGLE DRIVE -- -- Files for the public site to link to (a handout, slides, a talk's -- audio, a brand kit), uploaded from Tools → Media → Files into the -- shared drive's "Blog" folder (routes/files.js) and shared as -- "anyone with the link can view". Content blocks link to `url`, -- Drive's page for the file. -- -- preview /uploads/... of Drive's picture of the first page, in -- the media library, once Drive has drawn one (PDFs and -- Office files); a link card to the file takes it as its -- picture -- ═══════════════════════════════════════════════════════════════ CREATE TABLE drive_files ( id INTEGER PRIMARY KEY AUTOINCREMENT, drive_id TEXT NOT NULL UNIQUE, name TEXT NOT NULL, mime TEXT NOT NULL, bytes INTEGER NOT NULL CHECK (bytes >= 0), url TEXT NOT NULL, preview TEXT, uploaded_by INTEGER REFERENCES admin_users (id) ON DELETE SET NULL, created_at TEXT NOT NULL DEFAULT (datetime('now')) ) STRICT; CREATE INDEX drive_files_created_idx ON drive_files (created_at DESC);