n8n/docs
Benjamin Schroth 5968601c6e
refactor(core): Align id column widths across the agent tables
Ten agent id columns were declared wider than the id column they take
their value from. Nothing was declared narrower, so there is no
truncation to repair; what this fixes is the schema disagreeing with
itself, which costs reviewer time and misleads the next author to copy a
neighbour.

Narrowed to the width of the referenced column:

  agents.projectId                              255 -> 36
  agent_execution_threads.projectId             255 -> 36
  agent_checkpoints.agentId                     255 -> 36
  agent_chat_subscriptions.credentialId         255 -> 36
  agents_messages.threadId                      255 -> 128
  agents_memory_entry_sources.threadId          255 -> 128
  agents_observations.observationScopeId        255 -> 128
  agents_observation_cursors.observationScopeId 255 -> 128
  agents_observation_locks.observationScopeId   255 -> 128
  agents_memory_entry_cursors.observationScopeId 255 -> 128

`observationScopeId` reads like a free-form scope but holds a foreign key
to agents_threads.id, so it is a thread id under a name that hides it.

Entity `length:` values move with the migration, and the generated schema
docs are regenerated because their ER diagrams embed these widths.

Out of scope: agent_checkpoints.runId (LangGraph run id), *.resourceId and
agents_resources.id (platform user ids) and agent_chat_subscriptions.threadId
(a platform thread id) do not hold one of our own ids.
2026-09-21 09:48:33 +02:00
..
generated refactor(core): Align id column widths across the agent tables 2026-09-21 09:48:33 +02:00
db.md feat(core): Add auto-generated database schema documentation (no-changelog) (#32069) 2026-06-12 07:44:01 +00:00