Skip to content
  • Leigh B. Stoller's avatar
    Add support for moving deleted users to a deleted users table. This · b4231fbf
    Leigh B. Stoller authored
    would be no big deal, except that we want to retain user_stats for
    deleted users, and rather then a deleted_user_stats table, I want to
    retain stats for deleted users in the user_stats table, since that
    is a more natural place for them.
    
    The main problem is that we use the login (uid) as the cross table
    reference slot all over the DB, which is fundamentally incorrect, if
    we want to be able reuse uids and still know what historical data
    refers to.
    
    So, I have taken a few baby steps towards weaning us off the uid, and
    towards permanently unique key for users, using the unix_uid integer
    for now, but probably something slightly different later.
    
    The user_stats is now indexed on this new key (called uid_idx in the
    users_stats table) instead of the plain uid.
    
    The unix_uid slot in the users table is no longer an auto_increment
    field, but instead uses the emulab_indicies table for the next
    available index.
    b4231fbf