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

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

class ChangePypiPythonVersionType < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    change_column_type_concurrently :packages_pypi_metadata, :required_python, :text, batch_column_name: :package_id # rubocop:disable Migration/AddLimitToTextColumns
  end

  def down
    cleanup_concurrent_column_type_change(:packages_pypi_metadata, :required_python)
    change_column_null :packages_pypi_metadata, :required_python, false
  end
end