summaryrefslogtreecommitdiff
path: root/db/migrate/20210426094524_initialize_conversion_of_ci_builds_to_bigint.rb
blob: e2f82557387f26707de9ae2b4a25feb3a8a49005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

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

  TABLE = :ci_builds
  COLUMNS = %i(id stage_id)
  TARGET_COLUMNS = COLUMNS.map { |col| "#{col}_convert_to_bigint" }

  def up
    initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
  end

  def down
    revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
  end
end