Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20231205165049_add_slug_to_topics.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dedd871473d8f2245da352ca57f8cbe95700dd0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class AddSlugToTopics < Gitlab::Database::Migration[2.2]
  disable_ddl_transaction!

  milestone '16.8'

  def up
    with_lock_retries do
      add_column :topics, :slug, :text, if_not_exists: true
    end

    add_text_limit :topics, :slug, 255
  end

  def down
    with_lock_retries do
      remove_column :topics, :slug, if_exists: true
    end
  end
end