Commit 71be85d3 authored by Michał Zając's avatar Michał Zając Committed by Tiger Watson

Add detected_at to Vulnerabilities table

parent 05ea31d2
# frozen_string_literal: true
class AddDetectedAtToVulnerabilities < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
def up
with_lock_retries do
add_column :vulnerabilities, :detected_at, :datetime_with_timezone
change_column_default :vulnerabilities, :detected_at, -> { 'NOW()' }
end
end
def down
with_lock_retries do
remove_column :vulnerabilities, :detected_at
end
end
end
de9167bc4f9e2b68b257a7ff81636d5dbb6d73ff81672fdf1c73adadf5707bea
\ No newline at end of file
......@@ -19046,7 +19046,8 @@ CREATE TABLE vulnerabilities (
dismissed_at timestamp with time zone,
dismissed_by_id bigint,
resolved_on_default_branch boolean DEFAULT false NOT NULL,
present_on_default_branch boolean DEFAULT true NOT NULL
present_on_default_branch boolean DEFAULT true NOT NULL,
detected_at timestamp with time zone DEFAULT now()
);
CREATE SEQUENCE vulnerabilities_id_seq
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment