column | data type | nullable? | key type | notes |
---|---|---|---|---|
public_id | char(10) | N | primary | server-side generated, unique hash, alphanumeric |
The id table provides a way of generating unique ids for both landlords and tenants. Whenever a new landlord or tenant is created, the server generates a random ten-character string, then attempts to insert it into the db, repeating until it succeeds. This prevents leaking user numbers.