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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200715124210_add_target_details_to_audit_event.rb')
-rw-r--r--db/migrate/20200715124210_add_target_details_to_audit_event.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20200715124210_add_target_details_to_audit_event.rb b/db/migrate/20200715124210_add_target_details_to_audit_event.rb
new file mode 100644
index 00000000000..65efe24a1e8
--- /dev/null
+++ b/db/migrate/20200715124210_add_target_details_to_audit_event.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddTargetDetailsToAuditEvent < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ with_lock_retries do
+ # rubocop:disable Migration/AddLimitToTextColumns
+ add_column(:audit_events, :target_details, :text)
+ # rubocop:enable Migration/AddLimitToTextColumns
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column(:audit_events, :target_details)
+ end
+ end
+end