ludido-web crashed: DB table "establishments" missing after migrations report success
armellaminsi
PROOP

a month ago

Project ID: d227e569-afc9-4895-86f7-52aca9d22857

Service: ludido-web

Environment: production

Last working deployment: 91cc99cd (13:11 UTC)

Error: relation "establishments" does not exist

Question: Can you check the database schema integrity or rollback the DB to before 13:00 UTC?

What I cannot fix:

❌ This is not an application code issue

❌ Restarting/redeploying won't work (migrations pass but table is still missing)

❌ Only Railway can inspect/repair the database schema

What might help:

Railway may need to rollback the database to a backup from when the service was working

Or validate/repair the schema directly

Meanwhile:

ludicopilot is still ONLINE and working (if you need to reference it)

The site is down until the DB is fixed

$20 Bounty

3 Replies

Railway
BOT

a month ago

Having looked into this, the issue appears to be in your application code or configuration rather than the Railway platform itself, which puts it outside what Railway support can resolve directly.

This is exactly the kind of problem the Railway community is good at, so we'd like to open your thread as a community bounty. Railway pays a bounty to the community member who solves it, and threads like this usually get picked up quickly.

Opening it makes this entire thread public, including everything already posted. Nothing becomes public until you decide. Use the buttons below.

  • Open to the community - Before you click, take a moment to edit or remove anything you'd rather not share. The thread becomes publicly visible right away.
  • Keep it private and close the thread - Nothing becomes public and the thread closes.

Status changed to Awaiting User Response Railway • about 1 month ago


Railway
BOT

a month ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway • about 1 month ago


If you have backups enabled, you should be able to perform one by clicking on the database service, navigating to the Backups tab, then selecting the desired backup to roll back to.

If there aren't any backups available, then unfortunately, Railway isn't able to do anything about this.


anakmerch-dot
HOBBY

a month ago

I'd check one thing before assuming the DB itself is corrupted: are you 100% sure the migration and the running app are pointing at the exact same database/schema?

"Migrations pass but relation does not exist" often happens when the migration history says everything is applied, but either:

  • the app is connected to a different database
  • establishments exists under a different schema
  • search_path changed
  • the migration was marked as applied without actually running successfully

From the production database, I'd first run:

SELECT current_database(), current_schema();
SHOW search_path;

SELECT schemaname, tablename
FROM pg_tables
WHERE tablename = 'establishments';

If that returns nothing, check the migration table/history used by your framework and compare it with the actual schema.

Also, since you mentioned another service (ludicopilot) is still working, compare its DATABASE_URL / database service reference with ludido-web. Don't post the full credentials obviously, just verify both services are actually resolving to the same DB and environment.

I wouldn't rollback yet. If this is a migration-history or connection mismatch, restoring a backup could overwrite newer valid data without fixing the underlying issue.

The fact that migrations "succeed" is actually the part I'd investigate first.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...