20181212104941_backfill_releases_name_with_tag_name.rb 316 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# frozen_string_literal: true

class BackfillReleasesNameWithTagName < ActiveRecord::Migration[5.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    update_column_in_batches(:releases, :name, Release.arel_table[:tag])
  end

  def down
    # no-op
  end
end