blob: d300f7c83e1bd0ea8ecfec4c5d3d70b84407fec5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
class AddVersionToFeatureFlagsTable < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
FEATURE_FLAG_LEGACY_VERSION = 1
def up
# The operations_feature_flags table is small enough that we can disable this cop.
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25552#note_291202882
# rubocop:disable Migration/AddColumnWithDefault
add_column_with_default(:operations_feature_flags, :version, :smallint, default: FEATURE_FLAG_LEGACY_VERSION, allow_null: false)
# rubocop:enable Migration/AddColumnWithDefault
end
def down
remove_column(:operations_feature_flags, :version)
end
end
|