diff options
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 |