internal user ID, dont use email as one (#297) (fa7a8a8)
BREAKING CHANGES
life long refactor, which replaces username with an internal semi-sequential int64 id. This change allows one to change an email (which was earlier used as an id) and have an abstract id, which doesnt contain any private information. Migration of other services is required & extreme caution is advised as this change involves a drastic change on the database level. Must only have 1 running migration at any given time
Migration notes:
generate numeric ID for user instead of using email as identifier
most of actions can accept username (e.g. email), alias or id as user identifier
add config for migrations
user data contains id field instead of username
users.list action filter query can accept username instead of #
API tokens data contains userId field instead of username, except for old tokens which were created before migration, they contains username field like before