Files
platform/todo/backburner/four-foreign-keys-are-over-postgres-s-63.md
T
pastilhasandClaude Fable 5 db96f53bc2 todos: a backburner column, and the parked items on it
backburner joins TODO_STATUSES and the board's columns; the three items in the
backburner theme move onto the status, so parked is now a lane rather than a
folder you have to remember to open.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 04:34:41 +00:00

29 lines
1.6 KiB
Markdown

---
id: backburner/four-foreign-keys-are-over-postgres-s-63
title: "Four foreign keys are over Postgres's 63-character limit and re-create on every `db:push`"
theme: backburner
status: backburner
created: 2026-08-19
date_source: stated
order: 1
---
**Four foreign keys are over Postgres's 63-character limit and re-create on every `db:push`.**
Found 2026-08-19 while pushing `chat_notification_prefs`. Not a blocker and not causing trouble:
eight extra statements per push, no prompt, no data touched — the same harmless churn already
documented for `pk_music_now_playing`, and recorded here only so the next person reading a push
plan knows it is not their change.
command_hq_session_tags_session_row_id_command_hq_sessions_id_fk 64
command_hq_watcher_fires_session_row_id_command_hq_sessions_id_fk 65
bitcoin_wallet_frozen_utxos_wallet_id_bitcoin_wallet_wallets_id_fk 66
bitcoin_wallet_chain_cache_wallet_id_bitcoin_wallet_wallets_id_fk 65
The fix is the one `src/databases/CLAUDE.md` already prescribes and these four missed — declare
them with `foreignKey({ name: 'fk_…', … })` under 63 characters, exactly as
`fk_user_integrations_server_integration` was. **Renaming a constraint is not a data change**, but
it does mean one push where the old name drops and the new one is added, so do it deliberately
rather than folded into an unrelated change. Note the two bitcoin-wallet ones live in that
plugin's own repository (`plugins/bitcoin-wallet/db/schema.ts`), so this spans two repos and the
plugin half only churns on a host where that plugin is installed.