We're running into problems with migrating the database after updating to the latest version (self-hosted). We're thinking the safest bet is to wipe the database (since there's nothing important in there, yet), but has anyone else run into this problem?
Yes, database migration issues have been reported by other users. A common solution is to use the Alembic CLI to revert any partial migrations and reset the migration state. This can be done by running alembic stamp from the src/phoenix/db directory inside the Phoenix project root, as mentioned in this GitHub issue. If the database is not critical, wiping it and starting fresh is a viable option, as suggested in this Slack conversation.Would you like more detail on how to perform these steps? Sources:
- GitHub Issue 3246
- Slack Conversation
馃挕聽Hint: Mention RunLLM in the thread for followups.
Hey Samantha Z. really sorry to hear that, this is certainly unexpected. Can you elaborate on the problems you are seeing?
I think the issue is that we're trying to convert the docker-compose examples found online into a terraform/helm chart type setup, and troubleshoot why when we try to restart the database, we're getting these same 'migration failed' errors mentioned in this ticket
Is it possible to rule out connection issues between your phoenix container and your database container? Namely the database url is correct and accessible from the phoenix container? I am wondering if the migration error is somewhat of a red herring; We try to perform migrations on startup, and if the database is not accessible then technically the migration has failed
Yes, what we're seeing is that the container comes up and immediately crashes, so we can't log into it to run migrations
We doublechecked the database url
Dustin N. do you have more insight into the migration process for Phoenix? My understanding is that we will attempt to connect to your configured database url on boot-up, perform migrations, and then proceed
if we fail to connect, or migrate, we will crash
Just to clarify, you are using postgres correct?
yes, postgres
cool, thanks
Are you pinning your phoenix version directly or using the latest tag?
Yeah, it would be better if the container didn't just crash, but would let us log in to troubleshoot
It's pinned
Are you connecting to the same database instance that you had pre-update?
