a month ago
Here's exactly what happened:
- PR #237 added a UNIQUE INDEX to the database:
CREATE UNIQUE INDEX device_registry_user_unique
ON device_registry (tenant_id, outlet_id, logged_in_user)
-
Your production database had duplicate rows in device_registry (same captain logged in from multiple devices over time). When Railway deployed PR #237, PostgreSQL tried to create that unique index but FAILED because of those duplicates.
-
That failure broke the entire startup sequence. The migration step that warms the in-memory cache (loads all your outlet/menu/staff data into memory) never ran. Server started with empty cache.
-
Every login failed — because your email saisangeettax@gmail.com was only in the cache, not in the active memory anymore. The server only knew about the placeholder info@dinexpos.in.
-
The data itself was never deleted — it was in tenant_settings in PostgreSQL. But at some point Railway reset the PostgreSQL volume (Railway does this during certain maintenance/upgrades on free plans). That wiped tenant_settings completely.
So there were TWO problems:
PR #237 → broke login (fixed by reverting in PR #238)
Railway PostgreSQL volume reset → wiped all your outlet/menu/table/staff data
The data loss is the Railway volume reset — not our code. Our code only broke login, not the data.
5 Replies
a month ago
Your Postgres service has a volume attached and it is in a healthy state with approximately 359 MB of data on it. The volume was not reset or wiped by us, and there were no host maintenance events affecting your services. You are on the Hobby plan, not a free plan, and we do not reset volumes during maintenance on any plan. The data loss you are experiencing appears to be a result of your own application's migration behavior (as your PR #237 description outlines), not a platform-side volume reset.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
how to recover my data i cant login my admin panel and my clients access denied...also...please help me out...reset password email also not send....
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
a month ago
Hey! Seems like the data is likely still there, the app just can't access it.
Is your DB running? Can you access it using the Database tab or a DB client?
a month ago
yes its running yes i do but my tenaant data is missing....
a month ago
Unfortunately, I'm afraid your migration deleted the data from that table.
Unless you've done manual backups, there's no recovery path.