Commit Graph

4 Commits

Author SHA1 Message Date
root
99d64221a0 feat(schema): 003 — resources, deps, credentials, source_docs 2026-05-31 02:18:39 +10:00
root
652f7c3894 feat(schema): 002 — pages, page_revisions, refs with FTS + vector indexes 2026-05-31 02:16:06 +10:00
root
3ca1509935 fix(schema): enforce cross-space FK on tasks.project_id via composite key
Security review flagged that tasks.project_id could reference a project in
a different space. Added composite FK (project_id, space_id) -> projects(id, space_id)
with ON DELETE SET NULL (project_id) so a deleted project leaves the task in
its space with project_id NULL rather than orphaning into a NULL space.

Added two regression tests: cross-space FK rejection + cascade behavior.
2026-05-31 02:14:20 +10:00
root
05ee9b3f41 feat(schema): 001 — spaces, projects, tasks with check constraints
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 02:07:15 +10:00