blob: bdb6ef83ea729ca3b7d88f45d854e19f8e0ba900 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# frozen_string_literal: true
class CleanupBigintConversionForNoteDiffFilesForGitlabCom < Gitlab::Database::Migration[2.1]
include Gitlab::Database::MigrationHelpers::ConvertToBigint
enable_lock_retries!
TABLE = :note_diff_files
COLUMNS = [:diff_note_id]
def up
return unless should_run?
cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS)
end
def down
return unless should_run?
restore_conversion_of_integer_to_bigint(TABLE, COLUMNS)
end
private
def should_run?
com_or_dev_or_test_but_not_jh?
end
end
|