# 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:** 5

<div class="post-metadata">

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

</div>

Aha. Here’s what happened. It seems to be because we both used AI and it’s stupid and lazy. An alternative explanation is that it’s bad luck, but it looks like Claude (that’s what I used) doesn’t get a timestamp (NOT COOL, Claude), but just a date stamp and then adds a counter, so we both were working on the same day.

Here are the last few migrations that ran:

```plaintext
   up 20260316000001 Create discourse citationwizard openalex api keys
   up 20260316000002 Create discourse citationwizard api key daily snapshots
   up 20260316071735 Rename automation api key scope resource
   up 20260316071736 Rename ai api key scope resource
   up 20260316071737 Rename data explorer api key scope resource
   up 20260319000000 **********NO FILE**********
   up 20260319000001 Create discourse citationwizard user lookup events
   up 20260319000002 Create discourse citationwizard citation wizard sessions
   up 20260319033623 **********NO FILE**********
   up 20260319055039 **********NO FILE**********

```

And discourse-citationwizard (that supports [https://www.citationwizard.net/](https://www.citationwizard.net/), a citation/reference tool for academics) made a migration the same day. I thought that migration looked suspect, but didn’t have an idea that there would be implications like this. . .

So that’s why [plugins/discourse-ai/db/migrate/20260319000001\_create\_ai\_agent\_mcp\_servers.rb](https://github.com/discourse/discourse/blob/61da54b543168f33e499b806bc3f313a3a2ab2f3/plugins/discourse-ai/db/migrate/20260319000001_create_ai_agent_mcp_servers.rb#L5C5-L9C8) can’t run.

And I had the bad luck that my migration ran first (it’s easier to change my code than yours). I’m trying now to see if I can rename my migrations in the migration table. . .

---

_[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)._
