Migrate `ghost` user functionality to user_type column
Summary
Ghost users are determined as separate boolean column ghost
. We have generalized user_type
column which can be used to define specific user types like bots, service users or regular human accounts. We can migrate ghost
user to user_type
column and remove separate column.
Current there is only 1 GitLab.com ghost account. There is no constraint on number of ghost accounts from code perspective, so technically it's possible to manually create several of those. Only one will be used though.
**This issue should be an epic since it spreads across multiple releases. **
This issue has 4 sub-issues each reflecting one of steps for column removal guide
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.