Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

0046_platform_deploys.sql

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

0046_platform_deploys.sqlBlame33 lines · 1 contributor
f764c07Claude1-- Block N3 — Platform deploy timeline.
2--
3-- Records every deploy of THIS site (gluecron.com itself), surfaced by the
4-- `.github/workflows/hetzner-deploy.yml` workflow which POSTs to
5-- POST /api/events/deploy/started
6-- POST /api/events/deploy/finished
7-- These rows back the site-admin status pill in `src/views/layout.tsx` and
8-- the `/admin/deploys` timeline in `src/routes/admin-deploys.tsx`.
9--
10-- Strictly additive — drop the table to remove it. No FKs.
11--
12-- `run_id` is the GitHub Actions run id and is unique so a retried `started`
13-- POST short-circuits without inserting a second row. `source` namespaces
14-- the deploy target so future Fly/Vultr/Render targets can land here too
15-- without a schema change.
16
17CREATE TABLE IF NOT EXISTS "platform_deploys" (
18 "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
19 "run_id" text NOT NULL UNIQUE,
20 "sha" text NOT NULL,
21 "source" text NOT NULL,
22 "status" text NOT NULL DEFAULT 'in_progress',
23 "started_at" timestamptz NOT NULL DEFAULT now(),
24 "finished_at" timestamptz,
25 "duration_ms" integer,
26 "error" text,
27 "created_at" timestamptz NOT NULL DEFAULT now()
28);
29
30--> statement-breakpoint
31
32CREATE INDEX IF NOT EXISTS "idx_platform_deploys_started"
33 ON "platform_deploys" ("started_at" DESC);