From 26de5d3753389bd0bd21b8968699de1b1305f3a7 Mon Sep 17 00:00:00 2001 From: primal Date: Mon, 2 Feb 2026 15:46:33 -0500 Subject: [PATCH] Add status column to items table Items now have a status column ('pass' or 'fail', default 'pass') to control publishing eligibility. Includes migration for existing databases. Co-Authored-By: Claude Opus 4.5 --- db.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db.go b/db.go index f0ea145..a7a98b1 100644 --- a/db.go +++ b/db.go @@ -92,6 +92,9 @@ CREATE TABLE IF NOT EXISTS items ( image_urls JSONB, tags JSONB, + -- Item status: 'pass' (default, eligible for publishing), 'fail' (rejected) + status TEXT NOT NULL DEFAULT 'pass', + -- Publishing to PDS published_at TIMESTAMP, published_uri TEXT, @@ -328,6 +331,9 @@ func OpenDatabase(connString string) (*DB, error) { pool.Exec(ctx, "ALTER TABLE short_urls ADD COLUMN IF NOT EXISTS item_guid TEXT") } + // Migration: add status column to items table (pass/fail for publishing) + pool.Exec(ctx, "ALTER TABLE items ADD COLUMN IF NOT EXISTS status TEXT NOT NULL DEFAULT 'pass'") + fmt.Println(" Schema OK") // Run stats and background index creation