Skip to content

Add slug to topics

What does this MR do and why?

This MR:

  • adds slug column to topics table
  • populates slug value for newly created ::Projects::Topic instances

Note that is the first step of implementation steps suggested by @tkuah - #414892 (comment 1679333188)

So, next MR will contain changes related to:

Populate slug column, using data from name column with https://docs.gitlab.com/ee/development/database/batched_background_migrations.html.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to Project -> Settings -> General
  2. Add new topic (that does not exist) to project
  3. Check in rails console that new topic has slug value - ::Projects::Topic.last.slug # should not be nil

Related to #414892

Edited by Zakir Dzhamaliddinov

Merge request reports

Loading