2020-11-05 12:09:05 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddRequirementsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
2020-11-12 03:09:17 +00:00
|
|
|
unless column_exists?(:project_features, :requirements_access_level)
|
|
|
|
with_lock_retries { add_column :project_features, :requirements_access_level, :integer, default: 20, null: false }
|
2020-11-05 12:09:05 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2020-11-12 03:09:17 +00:00
|
|
|
if column_exists?(:project_features, :requirements_access_level)
|
|
|
|
with_lock_retries { remove_column :project_features, :requirements_access_level }
|
2020-11-05 12:09:05 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|