summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-05 21:09:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-05 21:09:40 +0000
commitad9eb72915f1be40da3ebe287274fe2bae62e46b (patch)
treee5a029b2edbce0e84a54b6ff4d18e8240680c4c4 /db
parentf8d20b20be74c283fe8bfe81abfd2d132a500968 (diff)
downloadgitlab-ce-ad9eb72915f1be40da3ebe287274fe2bae62e46b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb14
-rw-r--r--db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb17
-rw-r--r--db/schema_migrations/202007291759351
-rw-r--r--db/schema_migrations/202007302105061
-rw-r--r--db/structure.sql4
5 files changed, 36 insertions, 1 deletions
diff --git a/db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb b/db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb
new file mode 100644
index 00000000000..0562e8d1c14
--- /dev/null
+++ b/db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class AddDashboardPathToPrometheusMetrics < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def up
+ # Text limit is added in 20200730210506_add_text_limit_to_dashboard_path
+ add_column :prometheus_metrics, :dashboard_path, :text # rubocop:disable Migration/AddLimitToTextColumns
+ end
+
+ def down
+ remove_column :prometheus_metrics, :dashboard_path
+ end
+end
diff --git a/db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb b/db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb
new file mode 100644
index 00000000000..a236cc68988
--- /dev/null
+++ b/db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddTextLimitToDashboardPath < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit(:prometheus_metrics, :dashboard_path, 2048)
+ end
+
+ def down
+ remove_text_limit(:prometheus_metrics, :dashboard_path)
+ end
+end
diff --git a/db/schema_migrations/20200729175935 b/db/schema_migrations/20200729175935
new file mode 100644
index 00000000000..65aec146116
--- /dev/null
+++ b/db/schema_migrations/20200729175935
@@ -0,0 +1 @@
+5f841d2032b55f01e944c50070a6bb102883c2e4da7ba155fdcf2e90f3b68707 \ No newline at end of file
diff --git a/db/schema_migrations/20200730210506 b/db/schema_migrations/20200730210506
new file mode 100644
index 00000000000..b140941092d
--- /dev/null
+++ b/db/schema_migrations/20200730210506
@@ -0,0 +1 @@
+85eb0a510cdb4b315aef1665f05ad3b93d5d39f4ddfe11ed5ddde63aa732f874 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index d3fbf7a202f..991112e8564 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -14657,7 +14657,9 @@ CREATE TABLE public.prometheus_metrics (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
common boolean DEFAULT false NOT NULL,
- identifier character varying
+ identifier character varying,
+ dashboard_path text,
+ CONSTRAINT check_0ad9f01463 CHECK ((char_length(dashboard_path) <= 2048))
);
CREATE SEQUENCE public.prometheus_metrics_id_seq