summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb
blob: 54dce0a7da85eb2043bdfaf953cf8b04e81047e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class CleanupBigintConversionForCiBuildsMetadata < Gitlab::Database::Migration[1.0]
  enable_lock_retries!

  TABLE = :ci_builds_metadata

  def up
    cleanup_conversion_of_integer_to_bigint(TABLE, :id)
    cleanup_conversion_of_integer_to_bigint(TABLE, :build_id)
  end

  def down
    restore_conversion_of_integer_to_bigint(TABLE, :build_id)
    restore_conversion_of_integer_to_bigint(TABLE, :id)
  end
end