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

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

class AddNormalizedVersionToPackagesNugetMetadatum < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  def up
    with_lock_retries do
      add_column :packages_nuget_metadata, :normalized_version, :text, if_not_exists: true
    end

    add_text_limit :packages_nuget_metadata, :normalized_version, 255
  end

  def down
    with_lock_retries do
      remove_column :packages_nuget_metadata, :normalized_version, if_exists: true
    end
  end
end