summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 15:09:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 15:09:30 +0000
commitc6b3ec3f56fa32a0e0ed3de0d0878d25f1adaddf (patch)
tree967afee9a510ff9dd503ebd83706dc760ec2e3ed /db
parent903ccf7c93eb9490c76857bffe744249cc07de09 (diff)
downloadgitlab-ce-c6b3ec3f56fa32a0e0ed3de0d0878d25f1adaddf.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb21
-rw-r--r--db/structure.sql5
2 files changed, 25 insertions, 1 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
diff --git a/db/structure.sql b/db/structure.sql
index 2697dbbe2b1..f7c2fadef18 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -3749,7 +3749,9 @@ CREATE TABLE public.merge_request_metrics (
modified_paths_size integer,
commits_count integer,
first_approved_at timestamp with time zone,
- first_reassigned_at timestamp with time zone
+ first_reassigned_at timestamp with time zone,
+ added_lines integer,
+ removed_lines integer
);
CREATE SEQUENCE public.merge_request_metrics_id_seq
@@ -12936,6 +12938,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200330123739
20200330132913
20200331220930
+20200402123926
20200402135250
20200403184110
20200403185127