Migrate `ghost` logic to user_type column
Summary
This is part of #219001 (closed)
We need to migrate "ghost" logic to use user_type
Improvements
Simpler schema, simpler indexes, simpler code
Risks
Ghosts related functionality can be broken if something goes wrong.
Involved components
- app/models/user.rb
- db/schema.rb
Optional: Intended side effects
Ghost users can't be a ghost AND an alert\support bot at the same time. At GitLab.com ghost user is not a bot, so we are good here.
/cc @gitlab-org/maintainers/database WDYT?
Edited by Pavel Shutsin