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

0089_notifications.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.

0089_notifications.sqlBlame20 lines · 1 contributor
b7ecb14Claude1-- Notification Center (Block A7 follow-up).
2--
3-- The initial 0001 migration created the `notifications` table with the
4-- `kind` / `read_at` column set used by src/lib/notify.ts. The inbox
5-- UI (src/routes/notifications.tsx) was later built against the
6-- schema-extensions variant which uses `type` / `is_read` / `actor_id`.
7-- This migration adds the missing columns so both surfaces operate on the
8-- same physical table without a breaking rename.
9--
10-- All columns are additive (IF NOT EXISTS) so this migration is idempotent
11-- and safe to run against databases that already have these columns.
12
13ALTER TABLE "notifications"
14 ADD COLUMN IF NOT EXISTS "type" text,
15 ADD COLUMN IF NOT EXISTS "is_read" boolean NOT NULL DEFAULT false,
16 ADD COLUMN IF NOT EXISTS "actor_id" uuid REFERENCES "users"("id") ON DELETE SET NULL;
17
18-- Index used by the inbox page to find unread notifications quickly.
19CREATE INDEX IF NOT EXISTS "notifications_user_unread_is_read"
20 ON "notifications" ("user_id", "is_read", "created_at" DESC);