3x-ui/database
MHSanaei 169068d8fb
fix(nodes): clean up orphaned client_inbounds on node inbound removal
When a remote node disconnects or one of its inbounds vanishes from the
traffic snapshot, setRemoteTrafficLocked deleted the central inbound row
but left the client_inbounds join rows behind. Affected clients ended up
linked to hundreds of phantom inbounds, and editing one then failed with
"record not found" / "Load Old Data Error" because Update aborted on the
first GetInbound miss.

- Detach client_inbounds rows when deleting a vanished node inbound
- Prune stale links during client Update instead of aborting the save
- Drop orphaned client_inbounds rows on startup to heal existing DBs

Closes #4636
2026-05-29 01:41:52 +02:00
..
model feat(fallbacks): add per-rule dest override 2026-05-28 21:17:49 +02:00
db.go fix(nodes): clean up orphaned client_inbounds on node inbound removal 2026-05-29 01:41:52 +02:00
db_seed_test.go fix(clients): backfill missing subId on startup and guard create/update 2026-05-28 18:20:34 +02:00
dialect.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
migrate_data.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00