Private
Public Access
1
0
Commit Graph

7 Commits

Author SHA1 Message Date
Catherine Renelle 80641b6058 Fix deploy: add --accept-data-loss for search_vector column
prisma db push refuses to sync when the search_vector generated
column exists in the DB but not in the schema. The column is
managed by setup-search.sql which runs immediately after.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:12:46 -05:00
Catherine Renelle 04f5786cf6 Fix psql URI in entrypoint: strip Prisma query params
psql doesn't understand ?schema=public in the DATABASE_URL.
Strip query parameters before passing to psql for RLS, collation,
and search index scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:46:14 -05:00
Catherine Renelle 95f8e9a70b Fix column/card ordering: set COLLATE C on position columns
Postgres en_US.utf8 collation sorts case-insensitively, breaking the
lexicographic fractional indexing. Setting COLLATE "C" ensures pure
byte-order sorting. Applied via setup-collation.sql in entrypoint
after prisma db push.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 07:40:13 -05:00
Catherine Renelle 6ed0349507 Phase 7: Search, filters, templates, and archive UI
Add full-text card search (PostgreSQL tsvector + GIN index) with navbar
SearchBar, client-side board filters (label/assignee/due date), board
templates (3 system templates + save-as-template API), and archive
toggle for both board listing and board view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 00:42:20 -05:00
Catherine Renelle bd12160ebb Phase 2: Enforce Row-Level Security at the PostgreSQL level
- Rewrite rls.ts with withTenant()/withBypassRLS() using parameterized
  set_config() in interactive Prisma transactions (no SQL injection)
- Add FORCE ROW LEVEL SECURITY on all 15 tenant-scoped tables
- Add __bypass__ sentinel and WITH CHECK clauses to every RLS policy
- Explicitly DISABLE RLS on tenants, tenant_hostnames, sessions
- Wrap all API route and page loader queries in withTenant()
- Wrap validateSession() in withBypassRLS() (joins RLS-protected users)
- Keep existing tenantId where-clause filters as optimization layer
- Add postgresql-client to Dockerfile and auto-apply RLS via entrypoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:54:26 -05:00
Catherine Renelle f90489c2ff Show prisma db push errors in entrypoint, add .gitattributes for LF
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:59:23 -05:00
Catherine Renelle b47cc8748d Add docker-entrypoint.sh to retry DB connection on startup
The app container starts before DNS resolution is ready,
causing prisma db push to fail. Entrypoint now retries
until the database is reachable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:45:13 -05:00