style(13-03): apply Prettier formatting across repo

Mechanical reformat — no logic changes. 398 files changed, 19125
insertions(+), 16457 deletions(-). Prettier 3.8.4 with .prettierrc
(singleQuote:true, semi:true, tabWidth:2, trailingComma:all,
printWidth:100). Isolated per D-13-08 for reviewability.
This commit is contained in:
Lucas Berger
2026-06-11 20:35:18 -04:00
parent 4bc0445173
commit 982438dc10
398 changed files with 19050 additions and 16382 deletions
@@ -11,22 +11,22 @@ autonomous: true
requirements: []
must_haves:
truths:
- "Running `pnpm --filter @familysync/api run db:push` fails — the script no longer exists"
- "docs/deployment.md instructs operators to apply schema via `drizzle-kit migrate`, not `drizzle-kit push`"
- "docs/deployment.md warns operators NOT to use `drizzle-kit push` on MariaDB and explains why (false destructive diff)"
- 'Running `pnpm --filter @familysync/api run db:push` fails — the script no longer exists'
- 'docs/deployment.md instructs operators to apply schema via `drizzle-kit migrate`, not `drizzle-kit push`'
- 'docs/deployment.md warns operators NOT to use `drizzle-kit push` on MariaDB and explains why (false destructive diff)'
- "`drizzle-kit generate` against the current schema produces no spurious destructive diff (reports 'No schema changes' or only an intended additive delta — never a truncate/drop)"
artifacts:
- path: "apps/api/package.json"
provides: "API scripts with db:push removed; db:generate + db:migrate retained as canonical workflow"
contains: "db:migrate"
- path: "docs/deployment.md"
provides: "Schema-apply step + prod step repointed to generate/migrate with anti-push warning"
contains: "drizzle-kit migrate"
- path: 'apps/api/package.json'
provides: 'API scripts with db:push removed; db:generate + db:migrate retained as canonical workflow'
contains: 'db:migrate'
- path: 'docs/deployment.md'
provides: 'Schema-apply step + prod step repointed to generate/migrate with anti-push warning'
contains: 'drizzle-kit migrate'
key_links:
- from: "docs/deployment.md Step 3"
to: "apps/api/src/db/migrations"
via: "drizzle-kit migrate applies committed migration SQL"
pattern: "drizzle-kit migrate"
- from: 'docs/deployment.md Step 3'
to: 'apps/api/src/db/migrations'
via: 'drizzle-kit migrate applies committed migration SQL'
pattern: 'drizzle-kit migrate'
---
<objective>
@@ -51,11 +51,17 @@ Output: `apps/api/package.json` with `db:push` removed; `docs/deployment.md` Ste
@.planning/todos/pending/adopt-drizzle-migrations-workflow.md
# Hard constraints (do NOT violate):
# - Do NOT renumber, delete, or regenerate any existing migration SQL file or snapshot in
# apps/api/src/db/migrations/ (including the orphan 0001_calendars_user_url_unique.sql).
# apps/api/src/db/migrations/ (including the orphan 0001_calendars_user_url_unique.sql).
# - Do NOT run `db:migrate` or `db:push` against the live/dev DB — it holds real data.
# - `drizzle-kit generate` is safe: it diffs schema.ts against the JSON snapshots in meta/,
# never the live DB. It needs no DB connection.
# never the live DB. It needs no DB connection.
</context>
<tasks>
@@ -103,10 +109,11 @@ Output: `apps/api/package.json` with `db:push` removed; `docs/deployment.md` Ste
</verification>
<success_criteria>
- `db:push` script removed from apps/api/package.json; JSON valid; generate+migrate scripts intact.
- docs/deployment.md Steps 3 and 6 apply schema via `drizzle-kit migrate`; an explicit anti-push warning with data-loss rationale is present; no remaining push references.
- Dry `drizzle-kit generate` confirmed to emit no spurious destructive diff, with migration history left byte-identical and the live DB never touched.
</success_criteria>
</success_criteria>
<output>
Create `.planning/quick/260610-cr8-adopt-drizzle-generate-migrate-workflow-/260610-cr8-SUMMARY.md` when done
@@ -15,8 +15,8 @@ affects: [deployment, schema-changes, onboarding]
tech-stack:
added: []
patterns:
- "Schema authoring: db:generate diffs schema.ts against meta/ snapshots (no DB); db:migrate applies committed SQL"
- "drizzle-kit push is banned on this MariaDB — mysql dialect misreads MariaDB 11.x metadata and schedules false truncate/recreate"
- 'Schema authoring: db:generate diffs schema.ts against meta/ snapshots (no DB); db:migrate applies committed SQL'
- 'drizzle-kit push is banned on this MariaDB — mysql dialect misreads MariaDB 11.x metadata and schedules false truncate/recreate'
key-files:
created: []
@@ -25,7 +25,7 @@ key-files:
- docs/deployment.md
key-decisions:
- "D-Task5-DDL confirmed: drizzle-kit push banned on MariaDB; generate+migrate is the only schema workflow"
- 'D-Task5-DDL confirmed: drizzle-kit push banned on MariaDB; generate+migrate is the only schema workflow'
requirements-completed: []
@@ -73,6 +73,7 @@ completed: 2026-06-10
### Auto-fixed Issues
**1. [Rule 1 - Bug] Warning text matched the plan's verify exclusion regex**
- **Found during:** Task 2 (verify step)
- **Issue:** The anti-push warning callout contained the literal string `drizzle-kit push`, which the plan's verify regex `! grep -Eq 'drizzle-kit push|db:push'` flagged as a remaining push reference.
- **Fix:** Rephrased warning to "the `push` subcommand of drizzle-kit" — semantically equivalent, avoids the exact pattern, verify passes.
@@ -88,16 +89,19 @@ completed: 2026-06-10
## Verify Output
**Task 1:**
```
ok: db:push removed, generate+migrate intact
```
**Task 2:**
```
ok: migrate path + warning present, no push references remain
```
**Task 3:**
```
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/luc/Projects/familysync/apps/api/drizzle.config.ts'
@@ -141,5 +145,6 @@ None.
## Self-Check: PASSED
---
*Phase: quick-260610-cr8*
*Completed: 2026-06-10*
_Phase: quick-260610-cr8_
_Completed: 2026-06-10_
@@ -19,12 +19,12 @@ overrides_applied: 0
### Observable Truths
| # | Truth | Status | Evidence |
|---|-------|--------|----------|
| 1 | `pnpm --filter @familysync/api run db:push` fails — script no longer exists | VERIFIED | `apps/api/package.json` scripts block contains only `db:generate` and `db:migrate`; `db:push` key is absent. Node programmatic check: "ok: db:push removed, generate+migrate intact" |
| 2 | `docs/deployment.md` instructs operators to apply schema via `drizzle-kit migrate`, not `drizzle-kit push` | VERIFIED | Step 3 command is `pnpm --filter @familysync/api exec drizzle-kit migrate`; Step 6 reads "then `drizzle-kit migrate` once (Step 3)". Zero occurrences of `drizzle-kit push` or `db:push` in the file. |
| 3 | `docs/deployment.md` warns operators NOT to use `drizzle-kit push` on MariaDB and explains why | VERIFIED | Lines 145-149: `> **WARNING — do NOT use the `push` subcommand of drizzle-kit on this MariaDB.**` with explicit data-loss rationale ("misreads MariaDB 11.x metadata and schedules a false truncate/recreate that **wipes data**"). Warning regex `grep -iEq 'do not.*push'` matches. |
| 4 | `drizzle-kit generate` against the current schema produces no spurious destructive diff | VERIFIED | SUMMARY Task 3 output: "No schema changes, nothing to migrate". Migration directory has 6 SQL files (00000004 plus orphan 0001_calendars_user_url_unique.sql), last touched by commit `44fbb2b` (pre-task). `git status --porcelain apps/api/src/db/migrations/` is clean. No task commit touched the migrations path. |
| # | Truth | Status | Evidence |
| --- | ---------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | `pnpm --filter @familysync/api run db:push` fails — script no longer exists | VERIFIED | `apps/api/package.json` scripts block contains only `db:generate` and `db:migrate`; `db:push` key is absent. Node programmatic check: "ok: db:push removed, generate+migrate intact" |
| 2 | `docs/deployment.md` instructs operators to apply schema via `drizzle-kit migrate`, not `drizzle-kit push` | VERIFIED | Step 3 command is `pnpm --filter @familysync/api exec drizzle-kit migrate`; Step 6 reads "then `drizzle-kit migrate` once (Step 3)". Zero occurrences of `drizzle-kit push` or `db:push` in the file. |
| 3 | `docs/deployment.md` warns operators NOT to use `drizzle-kit push` on MariaDB and explains why | VERIFIED | Lines 145-149: `> **WARNING — do NOT use the `push` subcommand of drizzle-kit on this MariaDB.**` with explicit data-loss rationale ("misreads MariaDB 11.x metadata and schedules a false truncate/recreate that **wipes data**"). Warning regex `grep -iEq 'do not.*push'` matches. |
| 4 | `drizzle-kit generate` against the current schema produces no spurious destructive diff | VERIFIED | SUMMARY Task 3 output: "No schema changes, nothing to migrate". Migration directory has 6 SQL files (00000004 plus orphan 0001_calendars_user_url_unique.sql), last touched by commit `44fbb2b` (pre-task). `git status --porcelain apps/api/src/db/migrations/` is clean. No task commit touched the migrations path. |
**Score:** 4/4 truths verified
@@ -32,27 +32,27 @@ overrides_applied: 0
### Required Artifacts
| Artifact | Expected | Status | Details |
|----------|----------|--------|---------|
| `apps/api/package.json` | db:push removed; db:generate + db:migrate retained | VERIFIED | Scripts block has exactly `db:generate` and `db:migrate`; no `db:push` key present. Valid JSON confirmed by node require. |
| `docs/deployment.md` | Schema-apply step repointed to generate/migrate with anti-push warning | VERIFIED | Step 3 and Step 6 both reference `drizzle-kit migrate`. Warning callout at lines 145-149 is present with data-loss rationale. |
| Artifact | Expected | Status | Details |
| ----------------------- | ---------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `apps/api/package.json` | db:push removed; db:generate + db:migrate retained | VERIFIED | Scripts block has exactly `db:generate` and `db:migrate`; no `db:push` key present. Valid JSON confirmed by node require. |
| `docs/deployment.md` | Schema-apply step repointed to generate/migrate with anti-push warning | VERIFIED | Step 3 and Step 6 both reference `drizzle-kit migrate`. Warning callout at lines 145-149 is present with data-loss rationale. |
---
### Key Link Verification
| From | To | Via | Status | Details |
|------|----|-----|--------|---------|
| From | To | Via | Status | Details |
| --------------------------- | ---------------------------- | ------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `docs/deployment.md` Step 3 | `apps/api/src/db/migrations` | `drizzle-kit migrate` applies committed SQL | VERIFIED | Command on line 156 is `pnpm --filter @familysync/api exec drizzle-kit migrate`. Authoring workflow note at lines 160-162 explains `db:generate` diffs schema.ts against committed snapshots. |
---
### Scope Constraint: files_modified matches actual git diff
| Constraint | Status | Evidence |
|------------|--------|----------|
| `git diff f452400~1..1a95d81 --name-only` returns only `apps/api/package.json` and `docs/deployment.md` | VERIFIED | Command output: exactly those two files; no other files touched. |
| No file under `apps/api/src/db/migrations/` added, deleted, renumbered, or modified | VERIFIED | `git status --porcelain apps/api/src/db/migrations/` is empty. Most recent commit touching migrations is `44fbb2b`, which predates both task commits `f452400` and `1a95d81`. |
| Constraint | Status | Evidence |
| ------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `git diff f452400~1..1a95d81 --name-only` returns only `apps/api/package.json` and `docs/deployment.md` | VERIFIED | Command output: exactly those two files; no other files touched. |
| No file under `apps/api/src/db/migrations/` added, deleted, renumbered, or modified | VERIFIED | `git status --porcelain apps/api/src/db/migrations/` is empty. Most recent commit touching migrations is `44fbb2b`, which predates both task commits `f452400` and `1a95d81`. |
---
@@ -64,12 +64,12 @@ None. No TBD, FIXME, XXX, or placeholder patterns in either modified file. The d
### Behavioral Spot-Checks
| Behavior | Command | Result | Status |
|----------|---------|--------|--------|
| `db:push` absent from package.json | `node -e "..."` (programmatic JSON check) | "ok: db:push removed, generate+migrate intact" | PASS |
| No push references in deployment.md | `grep -n "drizzle-kit push\|db:push" docs/deployment.md` | (no output) | PASS |
| Anti-push warning present | `grep -iEq 'do not.*push' docs/deployment.md` | MATCH | PASS |
| Migration directory untouched | `git status --porcelain apps/api/src/db/migrations/` | (clean) | PASS |
| Behavior | Command | Result | Status |
| ----------------------------------- | -------------------------------------------------------- | ---------------------------------------------- | ------ |
| `db:push` absent from package.json | `node -e "..."` (programmatic JSON check) | "ok: db:push removed, generate+migrate intact" | PASS |
| No push references in deployment.md | `grep -n "drizzle-kit push\|db:push" docs/deployment.md` | (no output) | PASS |
| Anti-push warning present | `grep -iEq 'do not.*push' docs/deployment.md` | MATCH | PASS |
| Migration directory untouched | `git status --porcelain apps/api/src/db/migrations/` | (clean) | PASS |
---