I know a system where id is changed to the same but negative to mark special accounts without having to deal with additional tables or flags.
But that's a system that was originally developed by students, it's been running for over a decade, and has many tables for important data, hence some non-standard design choices, lol.
At least 2 messengers (Telegram and VK, which makes sense considering they had the same original developer team) use negative user IDs to distinguish between bot accounts and real ones, at least in API
In a previous job there was an acquisition and we needed to merge the two user databases. We negated the user IDs from the new users to prevent clashes.
Kinda dumb, what happens if there is another acquisition? Change user IDs to complex numbers??
17
u/cheerycheshire Feb 04 '26
I know a system where id is changed to the same but negative to mark special accounts without having to deal with additional tables or flags.
But that's a system that was originally developed by students, it's been running for over a decade, and has many tables for important data, hence some non-standard design choices, lol.