diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2019-09-03 09:37:12 +0000 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-09-03 09:37:12 +0000 |
commit | de4e2dcafceee485cba9ef6993062b00a4929d2f (patch) | |
tree | 0b8ab300ce942344f4f7360493fbada1d67f7ad0 | |
parent | a8c451632194121111139a79e8489d1806c69b1b (diff) | |
parent | ab60775216e6d23ec7ee8a580793b5b3fa92f6f9 (diff) | |
download | gitlab-ce-de4e2dcafceee485cba9ef6993062b00a4929d2f.tar.gz |
Merge branch 'db/prometheus-metrics-not-null-constraints' into 'master'
Add not null constraints to prometheus_metrics table columns
Closes #66663
See merge request gitlab-org/gitlab-ce!32339
-rw-r--r-- | db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb | 8 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb b/db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb new file mode 100644 index 00000000000..6f3650ca966 --- /dev/null +++ b/db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb @@ -0,0 +1,8 @@ +class AddNotNullConstraintsToPrometheusMetricsYLabelAndUnit < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + change_column_null(:prometheus_metrics, :y_label, false) + change_column_null(:prometheus_metrics, :unit, false) + end +end diff --git a/db/schema.rb b/db/schema.rb index 5b89cdf0b98..3980627045e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2869,8 +2869,8 @@ ActiveRecord::Schema.define(version: 2019_09_02_131045) do t.integer "project_id" t.string "title", null: false t.string "query", null: false - t.string "y_label" - t.string "unit" + t.string "y_label", null: false + t.string "unit", null: false t.string "legend" t.integer "group", null: false t.datetime_with_timezone "created_at", null: false |