> ## Documentation Index
> Fetch the complete documentation index at: https://internal.softcrum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ADR-018 — Partitioning Standard on Supabase

> Monthly RANGE partitions on designated append-only tables only (data.md §4 list). Custom SQL migrations own the DDL; a cron job pre-creates N+2 months; DEFAULT partition alerts on any row.

Status: Proposed · Refs: DEC-B7, DEC-B8 · Pending: pg\_partman availability spike (implementation detail, not decision)

## Decision

Monthly RANGE partitions on designated append-only tables only (data.md §4 list). Custom SQL migrations own the DDL; a cron job pre-creates N+2 months; DEFAULT partition alerts on any row; retention job exports partition to Storage (NDJSON.gz) then drops it per plan tier (13/25/37+ months). Partition-key predicate mandatory in queries (CI lint, TS-005). Small/regular tables are NOT partitioned.

## Consequences

* Bounded table sizes, cheap retention, pruning keeps hot-path latency flat. − Operational moving parts (creation job, default alerts) — covered by runbook.
