20 lines
489 B
Ruby
20 lines
489 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddProjectIdIntoVulnerabilityRemediations < ActiveRecord::Migration[6.0]
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
|
|
def up
|
|
connection.execute('DELETE FROM vulnerability_remediations')
|
|
|
|
add_column :vulnerability_remediations, :project_id, :bigint, null: false # rubocop:disable Rails/NotNullColumn
|
|
end
|
|
|
|
def down
|
|
with_lock_retries do
|
|
remove_column :vulnerability_remediations, :project_id
|
|
end
|
|
end
|
|
end
|