[server] Add primary keys for a few tables.