# Bootstrap error: relation "ai\_agent\_mcp\_servers" does not exist -- due to migration id collision

**URL:** https://meta.discourse.org/t/bootstrap-error-relation-ai-agent-mcp-servers-does-not-exist-due-to-migration-id-collision/399572
**Category:** Self-hosting
**Created:** [March 30, 2026, 3:36pm UTC](https://meta.discourse.org/t/bootstrap-error-relation-ai-agent-mcp-servers-does-not-exist-due-to-migration-id-collision/399572 "2026-03-30T15:36:48Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [March 30, 2026, 3:55pm UTC](https://meta.discourse.org/t/bootstrap-error-relation-ai-agent-mcp-servers-does-not-exist-due-to-migration-id-collision/399572/4 "2026-03-30T15:55:11Z")

</div>

> [@pfaffman](#):
>
> This looks like a migration ordering issue in `discourse-ai`, or a missing earlier migration that should create `ai_agent_mcp_servers`.

> <https://github.com/discourse/discourse/blob/61da54b543168f33e499b806bc3f313a3a2ab2f3/plugins/discourse-ai/db/migrate/20260319000001_create_ai_agent_mcp_servers.rb#L5C5-L9C8>

> <https://github.com/discourse/discourse/blob/61da54b543168f33e499b806bc3f313a3a2ab2f3/plugins/discourse-ai/db/migrate/20260319070000_add_selected_tool_names_to_ai_agent_mcp_servers.rb#L5C12-L5C12>

These appear to be in the correct order…

Do you see any evidence in the logs that the first one was run?

(FWIW, I prefer your original human-authored report in the OP. It sticks to the facts, and doesn’t reach for potentially-incorrect conclusions)

---

_[View the full topic](https://meta.discourse.org/t/bootstrap-error-relation-ai-agent-mcp-servers-does-not-exist-due-to-migration-id-collision/399572)._
