Skip to content

Remove the user_interacted_projects table

What does this MR do and why?

Resolves #360823 (closed)

Following the documentation for:

How to set up and validate locally

  1. Run gdk psql and inspect the user_interacted_projects table
➜  gitlab git:(md-remove-user-interacted-projects-table) ✗ gdk psql
psql (14.9)
Type "help" for help.
gitlabhq_development=# \d user_interacted_projects
        Table "public.user_interacted_projects"
   Column   |  Type   | Collation | Nullable | Default
------------+---------+-----------+----------+---------
 user_id    | integer |           | not null |
 project_id | integer |           | not null |
Indexes:
    "user_interacted_projects_pkey" PRIMARY KEY, btree (project_id, user_id)
    "index_user_interacted_projects_on_user_id" btree (user_id)
Foreign-key constraints:
    "fk_0894651f08" FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
    "fk_722ceba4f7" FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
  1. Run migrations bundle exec rake db:migrate:up:main VERSION=20231213080625 and bundle exec rake db:migrate:up:main VERSION=20231213080710
  2. restart gdk psql and inspect table again, confirm it has been removed
➜  gitlab git:(md-remove-user-interacted-projects-table) gdk psql
psql (14.9)
Type "help" for help.

gitlabhq_development=# \d :user_interacted_projects
Did not find any relation named ":user_interacted_projects".

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 Missy Davies

Merge request reports