Skip to content

Create achievements model and database table

What does this MR do and why?

Related to &9429 and #374017 (closed)

We want the ability to recognize leading organizations and realize that many other open source projects will want similar abilities (to award contributors with achievements).

One of the ways we have decided to recognize is by creating an achievement which can be awarded to users. Roughly we'll probably need to:

  1. Create the achievement model (this MR)
  2. Create some CRUD mechanism
  3. Create a user_achievement model
  4. Create some CRUD mechanism (for groups/projects to award to users and for users to be able to toggle display of their achievements)
  5. Display a users achievements

Migration

lee@Lees-MacBook-Pro gitlab % bin/rails db:migrate                 
main: == 20221202144210 CreateAchievements: migrating ===============================
main: -- create_table(:achievements, {})
main: -- quote_column_name(:name)
main:    -> 0.0000s
main: -- quote_column_name(:avatar)
main:    -> 0.0000s
main: -- quote_column_name(:description)
main:    -> 0.0000s
main:    -> 0.0081s
main: == 20221202144210 CreateAchievements: migrated (0.0095s) ======================

lee@Lees-MBP gitlab % bundle exec rake db:migrate:down:main VERSION=20221202144210
main: == 20221202144210 CreateAchievements: reverting ===============================
main: -- drop_table(:achievements)
main:    -> 0.0051s
main: == 20221202144210 CreateAchievements: reverted (0.0086s) ======================

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lee Tickett

Merge request reports