2020-03-20 14:09:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class CreateVulnerabilityExports < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
# rubocop:disable Migration/PreventStrings
|
2020-03-20 14:09:31 -04:00
|
|
|
def change
|
|
|
|
create_table :vulnerability_exports do |t|
|
|
|
|
t.timestamps_with_timezone null: false
|
|
|
|
t.datetime_with_timezone :started_at
|
|
|
|
t.datetime_with_timezone :finished_at
|
|
|
|
t.string :status, limit: 255, null: false
|
|
|
|
t.string :file, limit: 255
|
|
|
|
t.bigint :project_id, null: false
|
|
|
|
t.bigint :author_id, null: false
|
|
|
|
t.integer :file_store
|
|
|
|
t.integer :format, limit: 2, null: false, default: 0
|
|
|
|
|
|
|
|
t.index %i[project_id id], unique: true
|
|
|
|
t.index %i[author_id]
|
|
|
|
end
|
|
|
|
end
|
2020-04-21 11:21:10 -04:00
|
|
|
# rubocop:enable Migration/PreventStrings
|
2020-03-20 14:09:31 -04:00
|
|
|
end
|