> ## 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.

# TS-001 — Foundational Migration (Engage/CRM)

> Objective: schemas core/loyalty/messaging/crm with all v1 tables, parametric seeds, designated partitions, platform tables.

Archetype: synchronous command (createInitiative patterns for services; SQL migrations custom)
Refs: DEC-B\*, ADR-011/013/017/018, standards/data.md

Objective: schemas core/loyalty/messaging/crm with all v1 tables, parametric seeds, designated partitions, platform tables.
In scope: pgSchema definitions in Drizzle · parametric tables + is\_system seeds + Zod union generation · money columns per standard · contacts with national\_id (+types catalog, normalizers, DV validators CL/BR/AR minimum, generic format others) · partitioned DDL via SQL migrations + partition pre-creation job (cron fan-out) · audit\_log, processed\_jobs, dead\_letters, usage\_snapshots · RLS + tenant guards on every table · program default auto-creation hook on tenant provisioning.
Out: any endpoint, any worker logic beyond partition job.
Acceptance: migrations idempotent on fresh + existing dev DB · dependency-cruiser green with new schema rules · seeds generate TS unions consumed by packages/core build · DEFAULT partitions empty after synthetic month-boundary test · RLS denial tests per table.
