DB schema: replace username with userid.

 * The code uses "userid" everywhere, but the DB schema uses "username".
   Fix it.