blob: 4a5e6942371d0c3b01cd461d157c82f200426720 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# frozen_string_literal: true
class RemovePipelineIdFromTestReports < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
remove_column :requirements_management_test_reports, :pipeline_id
end
def down
add_column :requirements_management_test_reports, :pipeline_id, :integer
with_lock_retries do
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key :requirements_management_test_reports, :ci_pipelines, column: :pipeline_id, on_delete: :nullify
# rubocop:enable Migration/AddConcurrentForeignKey
end
end
end
|