Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20200716044023_add_entity_path_to_audit_events.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d16bfaa0beb18450551d67349efd688997b98312 (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 AddEntityPathToAuditEvents < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    with_lock_retries do
      # rubocop:disable Migration/AddLimitToTextColumns
      add_column(:audit_events, :entity_path, :text)
      # rubocop:enable Migration/AddLimitToTextColumns
    end
  end

  def down
    with_lock_retries do
      remove_column(:audit_events, :entity_path)
    end
  end
end