CREATE TABLE IF NOT EXISTS github_project (
org text NOT NULL,
number int NOT NULL,
title text NOT NULL,
description text,
url text NOT NULL,
closed boolean NOT NULL DEFAULT false,
category text,
category_reasoning text,
updated_at timestamptz NOT NULL DEFAULT NOW(),
PRIMARY KEY (org, number)
);
CREATE INDEX IF NOT EXISTS idx_github_project_org_open ON github_project (org, closed)
WHERE
closed = false;
CREATE INDEX IF NOT EXISTS idx_github_project_category ON github_project (org, category)
WHERE
closed = false;
DROP TABLE IF EXISTS github_project;