feat(migration): add matter_workspace_links (Practice Management Task 1)

↗ view on GitHub · sloth-ninja · 2026-08-12 · 39e629f2

Creates the one stored Clio artefact for Practice Management: the
id/number pair anchoring a JessicaOS workspace (a projects row) to a
live Clio matter. Everything else stays a live Clio read; no matter
data is persisted. project_id's on delete cascade is load-bearing for
the WS8 deletion-governance purge path. Mirrored in schema.sql
alongside the user_clio_connections precedent, RLS enabled, revoked
from anon/authenticated.

Includes the owner's own allowlist entry for
20260807_01_matter_workspace_links.sql in
.claude/hooks/authorized-migrations.json (committing the owner's
edit, not authoring it, per CLAUDE.md hard rule 1).

The merged train's seam (lib/clio/mattersSurface.ts,
userDataCleanup.ts, userDataExport.ts) already tolerates this table's
absence, so this is additive-only: zero behaviour change until this
migration is actually run in production.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository Sloth-ninja/JessicaOSS
Author sloth-ninja <ezanahaddis@gmail.com>
Authored
Parents 52e9e0bf
Stats 3 files changed , +66 , -1
Part of Practice Management: Clio-backed Matters and workspace links

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-39e629f2.md from inside the repo you want the change in.

⬇ Download capture-commit-39e629f2.md