diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 15:09:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 15:09:30 +0000 |
commit | c6b3ec3f56fa32a0e0ed3de0d0878d25f1adaddf (patch) | |
tree | 967afee9a510ff9dd503ebd83706dc760ec2e3ed /db/migrate | |
parent | 903ccf7c93eb9490c76857bffe744249cc07de09 (diff) | |
download | gitlab-ce-c6b3ec3f56fa32a0e0ed3de0d0878d25f1adaddf.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb b/db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb new file mode 100644 index 00000000000..1ca106e1614 --- /dev/null +++ b/db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddLineMetricsToMrMetrics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :merge_request_metrics, :added_lines, :integer + add_column :merge_request_metrics, :removed_lines, :integer + end + end + + def down + with_lock_retries do + remove_column :merge_request_metrics, :added_lines, :integer + remove_column :merge_request_metrics, :removed_lines, :integer + end + end +end |