debian-mirror-gitlab/db/migrate/20200901214416_change_pypi_python_version_type.rb
2020-11-24 15:15:51 +05:30

19 lines
551 B
Ruby

# 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