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:
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/, 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 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. . .